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
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: 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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 14:01:34 2024 UTC