|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13726 mktime bug
Submitted: 2001-10-18 02:31 UTC Modified: 2002-11-20 19:57 UTC
From: idisid at kyungmin dot ac dot kr Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0.6 OS: windows NT4.0
Private report: No CVE-ID: None
 [2001-10-18 02:31 UTC] idisid at kyungmin dot ac dot kr
is return -1.

but in linux renturn valid value;

maybe before 1970 bug in win32 version.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-18 05:55 UTC]
behaviour of unix timestamp functions for dates
before 1.1.1970 is simply undefined and depends 
on the system *and* c library implementation you

so stay away from undefined value ranges :)
 [2002-11-14 06:42 UTC] michael at liquidbytes dot net
What's the offical suggestion for getting UNIX timestamps for dates < 1970? Or is it not allowed to use them this way?

BTW: The offical PHP docs say, that dates between 1902 and 2037 are _allowed_. But you say "so stay away from undefined value ranges"!? Very strange. 

Can you explain that to the users/developers community?
 [2002-11-14 06:46 UTC]
In our fine manual:
 [2002-11-20 19:39 UTC] john at spamboxrecnot dot com
My ISP is using a new release of glibc and now mktime strtotime are not working for dates prior to 1970. I need to be able to add subtract a day from dates between now and before 1870.... anybody ?

ie I need to generate the dates either side of the search date for the forward / backward links.
 [2002-11-20 19:57 UTC]
try looking at the Date Package in PEAR

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jun 06 02:03:40 2023 UTC