#20280 [Bgs]: mktime() returns -3662
| From: | sniper@php.net | Date: | Tue, 21 Jan 2003 04:13:37 +0000 |
| Subject: | #20280 [Bgs]: mktime() returns -3662 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-30777@lists.php.net to get a copy of this message | ||
ID: 20280
Updated by: sniper@php.net
Reported By: mfladischer@abis.co.at
Status: Bogus
Bug Type: Date/time related
Operating System: Linux (Redhat 7.3)
PHP Version: 4CVS-2002-11-06
New Comment:
$ php -r 'echo date("d.m.Y", mktime(0,0,0,12,14,1901));'
14.12.1901
(using RH 6.2., glibc 2.1.3)
"Dec 14th 1901" is the last date that works, earlier will
always output 01.01.1970 :)
Previous Comments:
------------------------------------------------------------------------
[2002-11-06 08:14:10] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
On Unix systems it shoulbe possible to go as low as year 1900 or so, in
fact it works fine on my Slackware system. This problem has to do more
with your libc rather then PHP, since technically the timestamp value
is limited to 1970 - 2038 time period.
------------------------------------------------------------------------
[2002-11-06 07:24:59] mfladischer@abis.co.at
mktime() returns -3662 for years earlier than 1970. no matter which
year (tried with 1967,1956,1945,...).
bug or system-limitation?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20280&edit=1