#33919 [Opn->Fbk]: Wrong timestamp return

From: Date: Fri, 29 Jul 2005 13:26:31 +0000
Subject: #33919 [Opn->Fbk]: Wrong timestamp return
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82663@lists.php.net to get a copy of this message
ID: 33919 Updated by: sniper@php.net Reported By: gustavog at dextra dot com dot br -Status: Open +Status: Feedback -Bug Type: Calendar related +Bug Type: Date/time related Operating System: debian-sarge PHP Version: 5.0.4 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2005-07-29 15:21:09] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33919&edit=1

« previous php.bugs (#82663) next »