Bug #78966 [Ver]: strtotime transform error with
| From: | girgias@php.net | Date: | Mon, 20 Jan 2020 17:10:40 +0000 |
| Subject: | Bug #78966 [Ver]: strtotime transform error with | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225008@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78966&edit=1
ID: 78966
Updated by: girgias@php.net
Reported by: jackyxie007 at gmail dot com
Summary: strtotime transform error with
Status: Verified
Type: Bug
Package: Date/time related
Operating System: Linux Ubuntu 4.4.0-151-generic
PHP Version: Irrelevant
-Assigned To:
+Assigned To: derick
Block user comment: N
Private report: N
New Comment:
Assigning derick to confirm if it's an implementation bug or a doc bug.
Previous Comments:
------------------------------------------------------------------------
[2019-12-16 09:41:27] cmb@php.net
Behavior confirmed: <https://3v4l.org/G8fdq>.
The documentation[1] doesn't mention any restriction on the number
of fractional digits, so this is either an implementation or a
documentation bug.
[1] <https://www.php.net/manual/en/datetime.formats.compound.php>
------------------------------------------------------------------------
[2019-12-16 08:06:19] jackyxie007 at gmail dot com
Description:
------------
With decimal length of 9 digits after the Datetime string(Eg: 2019-12-15T17:51:38.948471000Z),
strtotime return false.
Test script:
---------------
<?php
$str = '2019-12-15T17:51:38.948471000Z';
var_dump(strtotime($str));
Expected result:
----------------
int(1576432298)
Actual result:
--------------
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78966&edit=1