php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20280 mktime() returns -3662
Submitted: 2002-11-06 07:24 UTC Modified: 2003-01-20 22:13 UTC
From: mfladischer at abis dot co dot at Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4CVS-2002-11-06 OS: Linux (Redhat 7.3)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
19 + 20 = ?
Subscribe to this entry?

 
 [2002-11-06 07:24 UTC] mfladischer at abis dot co dot at
mktime() returns -3662 for years earlier than 1970. no matter which year (tried with 1967,1956,1945,...).
bug or system-limitation?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-06 08:14 UTC] 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.
 [2003-01-20 22:13 UTC] sniper@php.net
$ 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 :)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 07:01:33 2024 UTC