#22998 [Opn->Csd]: strtotime handles DST very badly

From: Date: Tue, 01 Apr 2003 12:10:57 +0000
Subject: #22998 [Opn->Csd]: strtotime handles DST very badly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-36907@lists.php.net to get a copy of this message
 ID:               22998
 Updated by:       sniper@php.net
 Reported By:      przemek at cert dot pl
-Status:           Open
+Status:           Closed
 Bug Type:         Date/time related
 Operating System: Debian, Linux
 PHP Version:      4.3.1
 New Comment:

Works fine using PHP 4.3.2-RC. (on Linux..)



Previous Comments:
------------------------------------------------------------------------

[2003-04-01 02:57:31] przemek at cert dot pl

My mistake, there should be a '$', of course, but nevertheless the
result is -1 this time.

------------------------------------------------------------------------

[2003-04-01 02:45:30] rasmus@php.net

Try adding a $ in front of date_time on line 3

------------------------------------------------------------------------

[2003-04-01 02:16:30] 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...

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22998&edit=1



Thread (4 messages)

« previous php.bugs (#36907) next »