I have a problem with the formatDateTime() function:
date_default_timezone_set('Europe/Berlin'); // not necessary if system has that timezone set already
echo Yii::app()->dateFormatter->formatDateTime('1942-02-15','medium','medium') ;
This returns the wrong date/time:
Feb 14, 1942 11:00:00 PM (instead of Feb 15, 1942 12:00:00 AM)
This issue only occurs with certain dates in certain timezones
I think it’s quite important that this works, especially as quite common dates are affected by this bug.
With default php functions we could get it working at least for all dates in the 32bit unix timestamp range, I think that is more useful than half-broken support for a bigger range of time.
I suggest rewriting CTimestamp for the time being based on the PHP functions that seem to work pretty well for PHP versions >= 5.2.
I am not sure though if on some systems there would still be a problem with dates before 1970 (negative unix timestamp). Maybe there could be an option in Yii to choose between two versions of CTimestamp. The ADOdb bugfixes should also be included then.
With this implementation of CTimestamp things seem to work ok: