php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34383 gmmktime() and gmdate() are problem with 2038 years
Submitted: 2005-09-06 03:02 UTC Modified: 2005-09-06 17:36 UTC
From: justin at aofrozencity dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.4.0 OS: Windows 2003 Server
Private report: No CVE-ID: None
 [2005-09-06 03:02 UTC] justin at aofrozencity dot com
Description:
------------
gmmktime() and gmdate() are problem with 2028+ years

Warning: gmmktime(): Windows does not support negative values for this function in e:\vhosts\aofrozencity.net\subdomains\mycrib\httpdocs\calendar_beta.php on line 7

Warning: gmdate(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in e:\vhosts\aofrozencity.net\subdomains\mycrib\httpdocs\calendar_beta.php on line 35


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-06 07:45 UTC] derick@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

PHP only does 32bit signed integers, which run out somewhere in the year 2038 (not 2028), and then it rolls over to negative numbers - hence your warning. This won't be changed in PHP 4.4 or 5.0, but is addressed in 5.1 and higher.
 [2005-09-06 17:36 UTC] justin at aofrozencity dot com
If I upgrade 5.1 and higher then Will I have to rewrite all codes for the new verision of PHP?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Nov 29 17:00:01 2025 UTC