ID:               38777
 Updated by:       [EMAIL PROTECTED]
 Reported By:      magnus at ronnerup dot se
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: linux (unknown dist.)
 PHP Version:      4.4.4
 New Comment:

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.

You are not adding days but seconds as an offset.


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

[2006-09-11 07:15:16] magnus at ronnerup dot se

Description:
------------
It doesnt count to the right day. could be a summer/wintertime bug?

Reproduce code:
---------------
$order["journey_stay_first"] = 1161900000;

$adddays = $order["journey_stay_first"] + ( $_GET["x"] * 24 * 60 * 60);
   
$journey_first_stay_date = date('ymd', $order["journey_stay_first"]);
$journey_last_stay_date = date('ymd', $adddays); 

Expected result:
----------------
$order["journey_stay_first"] = 1161900000;
x, start, end:
0, 06 10 27 12:00:00, 06 10 27 12:00:01
1, 06 10 27 12:00:00, 06 10 28 12:00:01
2, 06 10 27 12:00:00, 06 10 29 12:00:01
3, 06 10 27 12:00:00, 06 10 30 11:00:01
4, 06 10 27 12:00:00, 06 10 31 11:00:01

Actual result:
--------------
$order["journey_stay_first"] = 1161900000;
x, start, end:
0, 06 10 27 12:00:00, 06 10 27 12:00:01
1, 06 10 27 12:00:00, 06 10 28 12:00:01
2, 06 10 27 12:00:00, 06 10 29 12:00:01
3, 06 10 27 12:00:00, 06 10 29 11:00:01
4, 06 10 27 12:00:00, 06 10 30 11:00:01


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


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

Reply via email to