#33056 [NEW]: strtotime() does not parse '20050518t090000'
| From: | dcturner2000 at yahoo dot co dot uk | Date: | Wed, 18 May 2005 12:58:39 +0000 |
| Subject: | #33056 [NEW]: strtotime() does not parse '20050518t090000' | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-79141@lists.php.net to get a copy of this message | ||
From: dcturner2000 at yahoo dot co dot uk
Operating system: Linux
PHP version: 5.0.3
PHP Bug Type: Date/time related
Bug description: strtotime() does not parse '20050518t090000'
Description:
------------
strtotime('20050518t090000Z') returns -1 and should return
1116406800
Further experimentation seems to suggest that any time in
that format whose tens-of-hours digit is 0 results in -1.
Reproduce code:
---------------
echo strtotime('20050518t090000Z')."\n";
echo strtotime('20050518t091234Z')."\n";
echo strtotime('20050518t191234Z')."\n";
echo strtotime('20050518t090000')."\n";
echo strtotime('20050518t091234')."\n";
echo strtotime('20050518t191234')."\n";
Expected result:
----------------
1116406800
1116407554
1116443554
1116403200
1116403954
1116439954
[Of course, some of that depends what time zone you're in]
Actual result:
--------------
-1
-1
1116443554
-1
-1
1116439954
--
Edit bug report at http://bugs.php.net/?id=33056&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33056&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33056&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33056&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33056&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33056&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33056&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33056&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33056&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33056&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33056&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33056&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33056&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33056&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33056&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33056&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33056&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33056&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33056&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33056&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33056&r=mysqlcfg