php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22998 strtotime handles DST very badly
Submitted: 2003-04-01 02:16 UTC Modified: 2003-04-01 06:10 UTC
From: przemek at cert dot pl Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.3.1 OS: Debian, 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: przemek at cert dot pl
New email:
PHP Version: OS:

 

 [2003-04-01 02:16 UTC] przemek at cert dot pl
  $date_time=strtotime("20030330 0100");
  echo "date_time reads: $date_time\n";
  $date_time=strtotime("+1 hour", date_time);
  echo "date_time reads: $date_time\n";

produces output:

  date_time reads: 1048982400
  date_time reads: 3600

I must say I wouldn't mind getting "2003-03-30 03:00", but
"1970-01-01 00:00" is more than surprising...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-01 02:45 UTC] rasmus@php.net
Try adding a $ in front of date_time on line 3
 [2003-04-01 02:57 UTC] przemek at cert dot pl
My mistake, there should be a '$', of course, but nevertheless the result is -1 this time.
 [2003-04-01 06:10 UTC] sniper@php.net
Works fine using PHP 4.3.2-RC. (on Linux..)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 14:01:29 2024 UTC