|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-03-30 07:33 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 13:00:01 2025 UTC |
Description: ------------ Since today (2004-03-30), we experience a calculation error when using strtotime("-1 month") to get previous month date. Maybe this error is due to the fact that 2004 is a bissextile year. The last bissextile year was 1996. Reproduce code: --------------- The actual computer date must be 2004-03-30. <? print strftime("%Y-%m-%d", strtotime("-1 month"))."\n"; ?> Expected result: ---------------- 2004-02-29 Actual result: -------------- 2004-03-01