php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20130 strtotime return -1 for date more than year 2038
Submitted: 2002-10-27 20:54 UTC Modified: 2002-10-30 00:36 UTC
From: yahya at titisb dot com dot my Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.2.3 OS: windows 98
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yahya at titisb dot com dot my
New email:
PHP Version: OS:

 

 [2002-10-27 20:54 UTC] yahya at titisb dot com dot my
echo strtotime("2039-01-01");

--it will return -1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-27 21:00 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.

unix timestamps are only good till about year 2038.
 [2002-10-30 00:32 UTC] rjames at yahoo-inc dot com
Don't brush off the problem because the underlying C code is short sighted.  Switch to a better date-time structure.
 [2002-10-30 00:33 UTC] derick@php.net
Please come up with a good implementation then, which works cross-platform, for all c libraires... It's not an easy fix, and I feel we shouldnt even start on this.

Derick
 [2002-10-30 00:36 UTC] rasmus@php.net
And such functions exist, but strtotime() is specifically documented to return a unix timestamp.  See php.net/calendar and specially the julian functions.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 15:01:35 2025 UTC