#33056 [Opn->Asn]: strtotime() does not parse '20050518t090000'

From: Date: Wed, 18 May 2005 14:11:48 +0000
Subject: #33056 [Opn->Asn]: strtotime() does not parse '20050518t090000'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79145@lists.php.net to get a copy of this message
ID: 33056 Updated by: derick@php.net Reported By: dcturner2000 at yahoo dot co dot uk -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: Linux PHP Version: 5.0.3 -Assigned To: +Assigned To: derick Previous Comments: ------------------------------------------------------------------------ [2005-05-18 14:58:39] dcturner2000 at yahoo dot co dot uk 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 this bug report at http://bugs.php.net/?id=33056&edit=1

« previous php.bugs (#79145) next »