#31768 [Opn->Bgs]: wrong date
| From: | derick@php.net | Date: | Sun, 30 Jan 2005 21:58:49 +0000 |
| Subject: | #31768 [Opn->Bgs]: wrong date | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73083@lists.php.net to get a copy of this message | ||
ID: 31768
Updated by: derick@php.net
Reported By: df at df-web dot hu
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Linux
PHP Version: 4.3.10
New Comment:
We are happy to tell you that you just discovered Daylight Savings
Time. For more information see:
http://webexhibits.org/daylightsaving/b.html
Instead of using mktime/date consider using gmmktime and gmdate which
do
not suffer from DST.
.
Previous Comments:
------------------------------------------------------------------------
[2005-01-30 22:53:10] df at df-web dot hu
Description:
------------
When I calculatethe 2005-10-31 date whith the script above, it will
write out wrong date! That is valable just for 2005-10-31!!!
Reproduce code:
---------------
<?php
$k1=date("d",(strtotime(2005-10-28)+3*86400));
echo $k1."\n" ;// = 30 but must be 31
?
Expected result:
----------------
31
Actual result:
--------------
30
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31768&edit=1