php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33919 Wrong timestamp return
Submitted: 2005-07-29 15:21 UTC Modified: 2005-08-06 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: gustavog at dextra dot com dot br Assigned:
Status: No Feedback Package: Date/time related
PHP Version: 5.0.4 OS: debian-sarge
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
19 - 6 = ?
Subscribe to this entry?

 
 [2005-07-29 15:21 UTC] gustavog at dextra dot com dot br
Description:
------------
When I user the function strtotime on february, I get a wrong timestamp.

Reproduce code:
---------------
$timestamp = strtotime("1 february 2005");
$timestamp = strtotime("2 Monday", $timestamp);
//No problem display "14-02-2005 -- Monday"
echo date("d-m-Y -- l ", $timestamp);
	
echo "<br />";
$timestamp = strtotime("1 february 2005");	
$timestamp = strtotime("3 Monday", $timestamp);	
//Display 20-02-2005 -- Sunday instead of 21-02-2005 -- Monday
echo date("d-m-Y -- l ", $timestamp);

Expected result:
----------------
The second echo command should display the third Monday of february, but it displays Sunday.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-29 15:26 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-08-06 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 09:01:26 2024 UTC