|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-02-27 12:29 UTC] lampacz at gmail dot com
Description:
------------
strtotime("0001-01-01") returns -62135600400
Bash (date -d '0001-01-01' "+%s") returns -62135600264
Postgres (select extract(epoch from timestamp '0001-01-01');) returns -62135600264
of course 64bit system
Test script:
---------------
echo strtotime("0001-01-01")
Expected result:
----------------
-62135600264
Actual result:
--------------
-62135600400
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 02:00:01 2025 UTC |
Same code returns different results after php update: $date=date_create("2014-01-01");echo date_timestamp_get($date); php 5.3.26 returns 1388534400 php 5.3.28 returns 1388541600 $date=date_create("2014-06-14");echo date_timestamp_get($date); php 5.3.26 returns 1402704000 php 5.3.28 returns 1402714800 this bug displays one day difference on screen depending on timezone