From:             helgeson dot b at gmail dot com
Operating system: CentOS 6.2
PHP version:      5.3.17
Package:          Date/time related
Bug Type:         Bug
Bug description:strtotime - weekday in a month where that weekday was the first 
day adds 1 week

Description:
------------
---
>From manual page: http://www.php.net/function.strtotime#refsect1-
function.strtotime-changelog
---

requesting a given occurrence of a given weekday in a month where that
weekday was 
the first day of the month would incorrectly add one week to the returned 
timestamp.  Although this was reported resolved as of PHP 5.2.7, it still
exists 
in PHP 5.3.3.

Maybe update the documentation to reflect the version the bug was actually

corrected in?



Test script:
---------------
$x = strtotime('Second Monday October 2012');

print date('Y-m-d', $x);


Expected result:
----------------
2012-10-8

Actual result:
--------------
2012-10-15

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

Reply via email to