From:             
Operating system: Linux linuxvps1.ciniva.com 2.6.1
PHP version:      Irrelevant
Package:          Date/time related
Bug Type:         Bug
Bug description:Adding a day to the timestamp does not change the value of 
date('d',$ts)

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 bug report at https://bugs.php.net/bug.php?id=55657&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55657&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55657&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55657&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55657&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55657&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55657&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55657&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55657&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55657&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55657&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55657&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55657&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55657&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55657&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55657&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55657&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55657&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55657&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55657&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55657&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55657&r=mysqlcfg

Reply via email to