From:             
Operating system: Ubuntu 10.10 Server
PHP version:      5.3.5
Package:          Date/time related
Bug Type:         Bug
Bug description:strtotime misinterprets dates in format "1 Aug, 2005" for the 
2000s

Description:
------------
It appears that strtotime misinterprets dates in formats like "1 Aug, 2005"
or "2 

Mar, 2008" for the 2000s. Dates in 1900s are unaffected. The month and day
values 

are correctly interpreted, but the year is being set to the current instead
of the 

correct value.

Test script:
---------------
strtotime('2 Mar, 2008');<br />

<?php print strtotime('2 Mar, 2008')?><br />

<br />

strtotime('2 Mar 2008');<br />

<?php print strtotime('2 Mar 2008')?><br />

<br />

strtotime('2 Mar, 1999');<br />

<?php print strtotime('2 Mar, 1999')?><br />

<br />

strtotime('2 Mar 1999');<br />

<?php print strtotime('2 Mar 1999')?><br />

Expected result:
----------------
strtotime should generate the same date for '2 Mar, 2008' as '2 Mar 2008'.

Actual result:
--------------
strtotime wrongly generates 1299114480 (2 Mar 2011) for '2 Mar, 2008' but 

correctly interprets 1204434000 for '2 Mar 2008'.



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

Reply via email to