Ok, here is something I wish I could travel back in time and shoot who ever decided it would be smart to make RDBMS locale dependent. As in crap like different decimal separators or worse yet date formats. If at all leave this work to the client, but better yet leave it to the frontend. Today I went through a bit of work until I finally figured out that in order to have SQL Server understand an ISO date (running against a DB configured as German), I needed to set the dateformat in the connection session with a query like "SET DATEFORMAT ymd". You might be wondering about the fact that "ymd" doesn't look very ISO date, but all it actually tells SQL Server is that the numbers between the separators are to denote year first, month second and day third. What really ticks me off though is that I once again forgot to look at the number one source for making RDBMS portable with PHP: the MDB2 source code. Its all right there .. *sigh*
I hope thats one of the things the Drizzle team ripped out, though actually I never remember having run into any such issues with MySQL .. not even sure this very second if that is just because of sane defaults or the fact that they did not support such madness to begin with. Its just such a pain how much work it is to ensure that you can be somewhat independent on whatever crazies DBA's choose to install by default. Worse yet SQL Server pushes you very hard to have all the defaults match up with the way your OS is installed. Yuck!
Very strange. I remember back in my time when I used to work with MSSQL the iso date worked always (assuming you're talking about YYYY-MM-DD). That was the one way we could get it to work on every locale. But that was some time ago - so I might be wrong or it just might have changed.
Yeah well I think those kinds of things come from the days when people where mostly interfacing with databases directly...
@Patrice: It's been a long time ago for me too since I last used MSSQL, but IIRC the date format issues also depend on how you're connecting with the server: If you're connecting using "official" Microsoft drivers with your PHP script running on a Windows machine, expect different results than when you're connecting from a Linux box using FreeTDS.
At least that's how I remember it (I ran into the date format issue myself some years ago - what a relief to see that stuff is still crap).