php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #10160 Unix timestamp doesnt go over Tuesday 19 January 2038 05:11
Submitted: 2001-04-04 11:00 UTC Modified: 2002-04-27 15:14 UTC
From: keith at waters dot co dot za Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4pl1 OS: RedHat Linux
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: keith at waters dot co dot za
New email:
PHP Version: OS:

 

 [2001-04-04 11:00 UTC] keith at waters dot co dot za
As you know, most of PHP's date and time functions use the unix timestamp, which wont go past Tuesday 19 January 2038 05:11, numberically represented by 2147483648 (ie 30 bits) 

Surely PHP can get clever and work around this? (ie allow bigger values which will translate back and forth properly up to the year 9999?)   Otherwise we will all find outselves with a Y2K-like date nightmare!

eg:  currently:  echo mktime(0,0,0,1,1,2099);  outputs -1
and putting any number past 2147483648 into date() wont give you anything past Tuesday 19 January 2038 05:11

Thanks!
regards,
Keith



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-27 15:14 UTC] jimw@php.net
use a c library with a 64-bit time_t.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 15:01:27 2024 UTC