php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25647 Date functions before 1970, after 2038
Submitted: 2003-09-24 13:33 UTC Modified: 2003-09-24 17:21 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:4 (100.0%)
From: jtucker at bsiweb dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.3 OS: Red Hat 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jtucker at bsiweb dot com
New email:
PHP Version: OS:

 

 [2003-09-24 13:33 UTC] jtucker at bsiweb dot com
Description:
------------
Hi,

We have a very troubling bug after upgrading Red Hat to 9.0 and PHP to 4.33. The problem is many of the date functions do not work with dates before 1970 or after 2038. This is a result of the posix standard set by glibc v2.3.

The major problem with this is this makes much of existing PHP code broken. Red Hat 9 is dependent on this version of glibc, as well as many libraries associated with PHP. A solution has been provided with an adodb date library, but this breaks a large amount of existing scripts including the Pear libraries and many pre-existing applications.

Many users choices are grim, either lock themselves into earlier versions of glibc, PHP, Linux, or be fored to update all their code to use the adodb function calls, along with every application upgrade and every update to Pear.

I strongly feel that support for date functions with glibc 2.3 should be included in the next version of PHP. We can't all wait for PHP 5 to support this functionality. Thank you.

Reproduce code:
---------------
getdate()
date() 
gmdate()
mktime()
gmmktime()
strtotime()

with any date before 1970 or after 2038 on a system compiled with glibc 2.3.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-24 17:21 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is a glibc issue not a PHP one. glibc 2.3+ no longer supports timestamps < 1970 as it did before.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 00:01:33 2024 UTC