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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

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-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC