i have a web application that contains localized content. Currently, the dates are all stored as datetime objects in an mssql 2005 database. I am on an IIS 6 server running PHP 5.2.12 . I am determining which content to serve up based on a language code parameter, but currently i am having some trouble with php using setlocale() in order to return a localized date ( proper language/format ) I believe this may be due to the bug described here, as I am experiencing similiar results: http://php.net/manual/en/function.setlocale.php
( warning is about 1/2 way down the page about IIS/PHP and setlocale() ) .
I was curious if anyone had any suggestions on how best to format this date in order to display it properly to the user on the front end of the site. Is it possible to handle this on the database level with casting in the query?