|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-05-02 18:39 UTC] kprice at gmail dot com
Description: ------------ The documentation claims: "On systems where time_t is a 32bit signed integer, as most common today, the valid range for year is somewhere between 1901 and 2038, although this limitation is overcome as of PHP 5.1.0." However, based on my testing this is not the case. mktime still returns FALSE for dates outside of this range. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 18:00:01 2025 UTC |
Derick, is this true even on 64bit systems? We've run into this problem using mktime and strtotime on 5.2. For example: mktime(0,0,0,1,1,1901) returns false strtotime("1/1/1901") returns false However date('r', -2178099690) returns: Mon, 24 Dec 1900 04:18:30 -0800 I have not figured out how to return the timestamp from a DateTime object created with the string "1/1/1901".php -r '$a = new DateTime("1/1/1901"); echo $a->format("U");' -2177456400 However, you do have a point. I think we even break to 32bit ints on 64 bit systems. I can check that when somebody grants me access to a 64bit machine.Using this you get the error in DATE(): echo date("M d, Y", strtotime("12/4/2038"); This day is outside the 32 bit range and it overflows the 32bit stack. I am using PHP 4.4 i forgot the rest, but version should be irrelevant... is anyone else getting this on v5.x.x ???