#25647 [Opn->Bgs]: Date functions before 1970, after 2038

From: Date: Wed, 24 Sep 2003 21:21:09 +0000
Subject: #25647 [Opn->Bgs]: Date functions before 1970, after 2038
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-48059@lists.php.net to get a copy of this message
ID: 25647 Updated by: iliaa@php.net Reported By: jtucker at bsiweb dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Red Hat 9 PHP Version: 4.3.3 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2003-09-24 13:33:05] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25647&edit=1

« previous php.bugs (#48059) next »