Edit report at https://bugs.php.net/bug.php?id=55657&edit=1

 ID:                 55657
 Updated by:         dtajchre...@php.net
 Reported by:        steve7642 at gmail dot com
 Summary:            Adding a day to the timestamp does not change the
                     value of date('d',$ts)
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Date/time related
 Operating System:   Linux linuxvps1.ciniva.com 2.6.1
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

You've discovered daylight saving time! This code helps you understand what 
happens slightly better: http://codepad.org/kBgS1g6W 

[1] http://en.wikipedia.org/wiki/Daylight_saving_time


Previous Comments:
------------------------------------------------------------------------
[2011-09-09 18:26:17] steve7642 at gmail dot com

Description:
------------
Adding  7 days to the timestamp for 2011-11-05 increased the date by 6 days 
only. run sample code. 

 

Test script:
---------------
/*
It appears that the day function of the time stamp is falling behind . 
*/ 
        $ts = mktime(0,0,0,10,29,2011) + 7*86400 ;
        $mday1 = date('d',$ts);  //OK

        $ts = mktime(0,0,0,10,29,2011) + 14*86400 ;
        $mday2 = date('d',$ts); //1 day behind
        
        $ts = mktime(0,0,0,10,29,2011) + 21*86400 ;
        $mday3 = date('d',$ts); // 1 day behind

echo $mday1. ' ' . $mday2.' '. $mday3 ; 




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



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

Reply via email to