php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35769 error handing dates prior to 1970
Submitted: 2005-12-22 08:42 UTC Modified: 2005-12-22 10:25 UTC
From: php at 62nds dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.4.2RC1 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at 62nds dot com
New email:
PHP Version: OS:

 

 [2005-12-22 08:42 UTC] php at 62nds dot com
Description:
------------
Wrong month and day returned by gmdate; year is correct most of the time.

Reproduce code:
---------------
	$membday = mktime(0, 0, 0, 6, 15, 1966);
	echo gmdate('Y.m.d', $membday);




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-22 08:45 UTC] php at 62nds dot com
Example outputs "1969.12.31", mktime returns correct value
 [2005-12-22 10:25 UTC] sniper@php.net
This depends lot on the OS behind. If you want reliable date handling you have to start using PHP 5.1 which has new date code. This is not critical bug in PHP 4 so it will never get fixed there.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Dec 06 22:00:02 2025 UTC