php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26935 strtotime("next wednesday") yields wrong result
Submitted: 2004-01-16 09:07 UTC Modified: 2004-01-16 10:01 UTC
From: matthias dot schuetze at bifab dot de Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.4 OS: Linux 2.4.24
Private report: No CVE-ID: None
 [2004-01-16 09:07 UTC] matthias dot schuetze at bifab dot de
Description:
------------
Hi,
we switched from PHP 4.2.3 to PHP 4.3.4. The code
    date("Y-m-d",strtotime("next wednesday")) 
that yields the correct date as with 4.2.3 now gives
the date one week further.
Example: today is 2004-01-16; next Wednesday is 2004-01-21, however the above given code results in 2004-01-28.

Good luck.




Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-16 09:14 UTC] sniper@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

In 4.3.0:

"- Brought strtotime() "next" keyword handling in line with documentation and its glibc cousin. (Rasmus)"

 [2004-01-16 09:41 UTC] matthias dot schuetze at bifab dot de
Well, you're right: the new behaviour is like the doc says.
Since it is different from before and since I didn't find the change comment in the manual I missed that goal.
Thank you and have a nice day.
 [2004-01-16 10:01 UTC] eru@php.net
re-bogusification

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Aug 16 21:01:28 2024 UTC