After moving application to new server with updated software (moved from php 5.2.17 -> 5.3.15, FreeTDS 0.64 -> 0.82)
SELECT GETDATE()
and any other datetime function / column produces something similar to:
2012-06-219 51:527:
// proper time: 2012-08-06 09:33:02
I know I can use convert
in select, but there are many stored procedures in DB that I can not change.
I tried to change /etc/locales.conf
and setting date format = %Y-%m-%d %H:%M:%S
, and using ini_set('mssql.datetimeconvert',1);
but freetds seems to ignore it and returns Aug 06 2012 09:33AM
Is there a way to retrieve datetime columns in standard format, without modifying every query?