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

Pull Requests

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: Thu Dec 26 23:01:28 2024 UTC