ID:               44176
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jason dot young at daystar dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: win 2003 IIs 6
 PHP Version:      5.2.5
 New Comment:

There is no "2am" in "America/Chicago" on March 9th, as the time goes
from 01:59:59 directly to 03:00:00:

zdump -v America/Chicago shows:

America/Chicago  Sun Nov  4 07:00:00 2007 UTC = Sun Nov  4 01:00:00
2007 CST isdst=0 gmtoff=-21600
America/Chicago  Sun Mar  9 07:59:59 2008 UTC = Sun Mar  9 01:59:59
2008 CST isdst=0 gmtoff=-21600
America/Chicago  Sun Mar  9 08:00:00 2008 UTC = Sun Mar  9 03:00:00
2008 CDT isdst=1 gmtoff=-18000
America/Chicago  Sun Nov  2 06:59:59 2008 UTC = Sun Nov  2 01:59:59
2008 CDT isdst=1 gmtoff=-18000
America/Chicago  Sun Nov  2 07:00:00 2008 UTC = Sun Nov  2 01:00:00
2008 CST isdst=0 gmtoff=-21600
America/Chicago  Sun Mar  8 07:59:59 2009 UTC = Sun Mar  8 01:59:59
2009 CST isdst=0 gmtoff=-21600



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

[2008-02-19 20:06:22] jason dot young at daystar dot com

Description:
------------
Ok I'm trying to do some calendar work right during this summers time
change hour. 3/9/2008 at 2 a.m. I work for a television network and we
have to created scheduals for every hour of every day. (This includes 2
am) strtotime or possibly strftime is not handling that 2:00 am hour
correctly here is some testing:

Reproduce code:
---------------
<?php
echo(strftime("%a %m/%d/%y %I:%M %p",(strtotime("3/9/2008 2:00:00
AM")))); 
echo " --- "; 
echo(strftime("%m/%d/%y %I:%M %p",(strtotime("Mar 9 2008 2:00AM")))); 
echo " --- "; 
echo(strtotime("-2 days ",strtotime("03/09/08")));
echo " --- "; 
echo(strtotime("-2 days ", 1205042400));
echo " --- "; 
echo(strtotime("3/9/2008 2:00:00 AM"));
echo " --- "; 
echo(strtotime("Mar 9 2008 2:00AM")); 
?>

Output:
Sun 03/09/08 03:00 AM --- 03/09/08 03:00 AM --- 1204869600 ---
1204869600 --- 1205049600 --- 1205049600

I've tried setting the TZ to US/CDT that didn't help ($test =
putenv("TZ=US/CDT");)


Expected result:
----------------
I expect the code to return a formated verson of the date "Mar 9 2008
2:00AM"

Actual result:
--------------
Sun 03/09/08 03:00 AM 

I apologize in advance if this is my misuse. 


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


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

Reply via email to