note 101842 rejected from function.strtotime by danbrown
| From: | danbrown@php.net | Date: | Thu, 13 Jan 2011 19:43:54 +0000 |
| Subject: | note 101842 rejected from function.strtotime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-175723@lists.php.net to get a copy of this message | ||
Note Submitter: mark2 at mailmetrash dot com
----
PHP 5.3 broke strtotime() in a way I haven't seen anybody mention. It really destroys the
usefulness of this built-in function.
Dojo and other JS libraries turn dates into strings with two timezones, one as GMT-XXXX and one as
the words describing the timezone.
PHP 5.3.1:
php -qr 'echo strtotime("Tue Jan 11 2011 00:00:00 GMT-0500 (Eastern Standard
Time)");'
[no output (i.e. false)]
PHP 5.2.5:
php -qr 'echo strtotime("Tue Jan 11 2011 00:00:00 GMT-0500 (Eastern Standard
Time)");'
1294704000
PHP 5.3.1:
php -qr 'echo strtotime("Tue Jan 11 2011 00:00:00 GMT-0500");'
1294722000
PHP 5.2.5:
php -qr 'echo strtotime("Tue Jan 11 2011 00:00:00 GMT-0500");'
1294704000
Work around:
http://stackoverflow.com/questions/1871780/