ID:               36688
 Comment by:       gxt3 at dowling dot edu
 Reported By:      phil at adigital dot com dot mx
 Status:           No Feedback
 Bug Type:         Date/time related
 Operating System: Win XP and Linux FC4
 PHP Version:      5.1.2
 New Comment:

I can confirm the bug of date() shifting one hour. I use 
date in a calendar app :
date("d",(mktime(0,0,0,$month,$day,$year)+$m*24*60*60))
where m goes from 0 to 1 and $month, $day, $year are given 
by the user. So it is either mktime or date problem.
for the last week of November the timestamps returned are:
27 Nov: 1161921600
28 Nov: 1162008000
29 Nov: 1162094400
30 Nov: 1162180800 (Bug here it is 23:00PM of 29th yet )
31 Nov: 1162267200 (Bug still here )
01 Oct: 1162353600 (Bug still present)
02 Oct: 1162440000 (Same here)
----
The following week (my weeks start on Friday) the times are 
back to normal.
The system is slackware 10.2 and I have not seen this bug in 
the past year. This is the first week that it occurs.


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

[2006-03-19 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2006-03-11 16:52:51] [EMAIL PROTECTED]

What timezone did you configure your server to use? (date.timezone
php.ini setting).

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

[2006-03-10 23:48:22] phil at adigital dot com dot mx

Description:
------------
date("Y-m-d H:i:s", 1175403600);
shows: 2007/4/1 00:00:00
Should be: 2007/3/1 23:00:00

the hour is shift 1 hour in PHP from march/11/2007 to april/1/2007 (20
days of 1 hour diff !)

The same problem repeat 2008, 2009, 2010, 2011, etc, but the beginning
of problem is +/- 5 days and ending problem too +/- 5 days

It seems the problem is not occuring before 3/1/2007

I thought first it was maybe a daylight savings problem 
BUT:
- it happens on our redhat 8 servers in US (ev1), local servers (FC4)
AND windows XP
- the start and end date of the problem is quite random in a period ,
daylights are quite fixed
- It doesnt happen before 3/1/2007

SO i guess it's a bad bug somewhere

the result *must* be same as unix_timestamp C++ function no ?
It is not

Thx !

Reproduce code:
---------------
print date("Y-m-d H:i:s", 1175403600);  // bad +1 hour
print date("Y-m-d H:i:s", 1238417200);  // bad +1 hour

print mktime(0,0,0,4,1,2007); 


Expected result:
----------------
2007/3/1 23:00:00
2009-03-30 06:46:40
1175407200

Actual result:
--------------
2007/4/1 00:00:00
2009-03-30 07:46:40
1175403600


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


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

Reply via email to