note 101842 added to function.strtotime
| From: | mark2 at mailmetrash dot com | Date: | Thu, 13 Jan 2011 19:31:26 +0000 |
| Subject: | note 101842 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175722@lists.php.net to get a copy of this message | ||
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/
----
Server IP: 69.147.83.197
Probable Submitter: 75.41.110.112
----
Manual Page -- http://www.php.net/manual/en/function.strtotime.php
Edit -- https://master.php.net/note/edit/101842
Del: integrated -- https://master.php.net/note/delete/101842/integrated
Del: useless -- https://master.php.net/note/delete/101842/useless
Del: bad code -- https://master.php.net/note/delete/101842/bad+code
Del: spam -- https://master.php.net/note/delete/101842/spam
Del: non-english -- https://master.php.net/note/delete/101842/non-english
Del: in docs -- https://master.php.net/note/delete/101842/in+docs
Del: other reasons-- https://master.php.net/note/delete/101842
Reject -- https://master.php.net/note/reject/101842
Search -- https://master.php.net/manage/user-notes.php