|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-03-10 11:27 UTC] daniele at orlandi dot com
Description: ------------ strtotime fails to parse timestamp returned by PostgreSQL in the default ISO 8601 output due to fractional seconds. This time stamp is not parsed (invalid): 2004-03-10 16:33:17.11403+01 This is correctly parsed: 2004-03-10 16:33:17+01 Fractional part could be ignored but shouldn't make strtotime consider the timestamp as invalid. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 19:00:01 2025 UTC |
Mmmh... do you really need an example script to test a function for two given values? :) Well... here is it: <? echo "2004-03-11 18:16:07.755155+01 = " .strtotime("2004-03-11 18:16:07.755155+01") ."<br />"; echo "2004-03-11 18:16:07+01 = " .strtotime("2004-03-11 18:16:07+01") ."<br />"; ?> Result: 2004-03-11 18:16:07.755155+01 = -1 2004-03-11 18:16:07+01 = 1079025367 Expected result: 2004-03-11 18:16:07.755155+01 = 1079025367 2004-03-11 18:16:07+01 = 1079025367