From:             devans14 at gmail dot com
Operating system: Windows XP Pro w/SP2
PHP version:      5.1.4
PHP Bug Type:     Unknown/Other Function
Bug description:  strtotime("last Sunday") produces a Saturday date sometimes

Description:
------------
When trying to find strtotime("last Sunday", $DATE) it will sometimes
generate a date on a Saturday instead of a Sunday, but only happens around
the 1st week of April of any year (I tested 2006-2010).


Reproduce code:
---------------
<?php
$a=strtotime("20060403");
$b=strtotime("last Sunday", $a);
echo date("Y/m/d", $b);
?>


Expected result:
----------------
2006/04/02



Actual result:
--------------
2006/04/01

A Saturday


-- 
Edit bug report at http://bugs.php.net/?id=37940&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37940&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37940&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37940&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37940&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37940&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37940&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37940&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37940&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37940&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37940&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37940&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37940&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37940&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37940&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37940&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37940&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37940&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37940&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37940&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37940&r=mysqlcfg

Reply via email to