From:             seld
Operating system: All
PHP version:      5.3.3
Package:          Date/time related
Bug Type:         Bug
Bug description:strtotime('next monday') resets the time to 00:00

Description:
------------
strtotime() should not reset the time unless specified, "next monday" does
reset the time to 00:00, while "next week" does not.

Test script:
---------------
var_dump(strtotime('next monday'));

var_dump(strtotime('next week'));

var_dump(date('Y-m-d H:i:s', strtotime('next monday')));

var_dump(date('Y-m-d H:i:s', strtotime('next week')));

Expected result:
----------------
int 1288641482

int 1288641482

string '2010-11-01 19:58:02' (length=19)

string '2010-11-01 19:58:02' (length=19)

Actual result:
--------------
int 1288569600

int 1288641482

string '2010-11-01 00:00:00' (length=19)

string '2010-11-01 19:58:02' (length=19)

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

Reply via email to