note 80809 rejected from function.strtotime by felipe
| From: | felipe@php.net | Date: | Fri, 01 Feb 2008 18:38:56 +0000 |
| Subject: | note 80809 rejected from function.strtotime by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-135711@lists.php.net to get a copy of this message | ||
Note Submitter: goldm at seznam dot cz
----
There is a buggy behaviour in strtotime when substracting month on December and March.
For example:
If $date is 31.12.2007 XX:XX:XX
then if you use
$date = strtotime("-1 month" , $date);
new date will be 01.12.2007 XX:XX:XX
If $date is 30.03.2007 XX:XX:XX
then if you use
$date = strtotime("-1 month" , $date);
new date will be 02.03.2007 XX:XX:XX