#50913 [Opn->Bgs]: mktime() won't go before 1901
ID: 50913
Updated by: rasmus@php.net
Reported By: drsmall at mycroftserve dot homelinux dot org
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Debian
PHP Version: 5.2SVN-2010-02-02 (snap)
New Comment:
Not a bug. UNIX timestamps are limited to 32 bit integers on 32 bit
machines so your effective range is 1901-2038 or so. Use
http://php.net/datetime instead if you need a larger range or
move to a
64-bit platform.
Previous Comments:
------------------------------------------------------------------------
[2010-02-02 16:16:03] drsmall at mycroftserve dot homelinux dot org
Description:
------------
Anything before 12 31, 1901 will not produce output.
Reproduce code:
---------------
<?php
// This will produce output.
echo mktime(0,0,0,12,31,1901);
// This will not.
echo mktime(0,0,0,1,1,1900);
?>
Expected result:
----------------
line 3 will display a timestamp with a negative value.
line 6 will display a timestamp with a negative value.
Actual result:
--------------
line 6 does not return a timestamp with a negative value.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50913&edit=1
Thread (2 messages)