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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gustavog at dextra dot com dot br
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Dec 22 11:01:30 2024 UTC