php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39245 date function generate wrong date with 1162083600 timestamp
Submitted: 2006-10-24 11:16 UTC Modified: 2006-10-24 11:38 UTC
From: lohner at aldea dot hu Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.1.6 OS: 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: lohner at aldea dot hu
New email:
PHP Version: OS:

 

 [2006-10-24 11:16 UTC] lohner at aldea dot hu
Description:
------------
date ("Y.m.d. H:i:s", 1162083600) generate wrong date


Reproduce code:
---------------
date ("Y.m.d. H:i:s", 1162083597) => 2006.10.29. 02:59:57 
date ("Y.m.d. H:i:s", 1162083598) => 2006.10.29. 02:59:58
date ("Y.m.d. H:i:s", 1162083599) => 2006.10.29. 02:59:59 
date ("Y.m.d. H:i:s", 1162083600) => 2006.10.29. 02:00:00 !!!
date ("Y.m.d. H:i:s", 1162083601) => 2006.10.29. 02:00:01
date ("Y.m.d. H:i:s", 1162083602) => 2006.10.29. 02:00:02


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-24 11:38 UTC] tony2001@php.net
We are happy to tell you that you just discovered Daylight Savings
Time. For more information see:
http://webexhibits.org/daylightsaving/b.html
Instead of using mktime/date consider using gmmktime and gmdate which do
not suffer from DST.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 23 03:00:03 2025 UTC