php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23478 date() -> mktime bug
Submitted: 2003-05-04 15:58 UTC Modified: 2003-05-05 01:35 UTC
From: rdzil at atlas dot cz Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.1 OS: Windows ME
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: rdzil at atlas dot cz
New email:
PHP Version: OS:

 

 [2003-05-04 15:58 UTC] rdzil at atlas dot cz
$test = "1048978801";
echo date('d.m.Y H:i:s',$test); // OUT: 30.03.2003 00:00:01
echo "<br>";
echo date('d.m.Y H:i:s',$test + (1*(60*60))); // $test+1 hour * OUT: 30.03.2003 01:00:01
echo "<br>";
echo date('d.m.Y H:i:s',$test + (2*(60*60))); // $test+2 hour - BAD * OUT: 30.03.2003 03:00:01

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-04 16:18 UTC] derick@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.

...
 [2003-05-05 01:35 UTC] rdzil at atlas dot cz
thanks and sorry, in my country change winter/summer time in other days...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 06:01:28 2024 UTC