strtotime() does not parse '20050518t090000'
| Bug #33056 | strtotime() does not parse '20050518t090000' | ||||
|---|---|---|---|---|---|
| Submitted: | 2005-05-18 14:58 UTC | Modified: | 2005-06-16 01:24 UTC | ||
| From: | dcturner2000 at yahoo dot co dot uk | Assigned: | derick (profile) | ||
| Status: | Closed | Package: | Date/time related | ||
| PHP Version: | 5.0.3 | OS: | Linux | ||
| Private report: | No | CVE-ID: | None | ||
[2005-05-18 14:58 UTC] 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
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2005-06-16 01:24 UTC] iliaa@php.net