#44177 [Opn->Bgs]: Inconsistent unix time to date
| From: | rasmus@php.net | Date: | Tue, 19 Feb 2008 21:36:52 +0000 |
| Subject: | #44177 [Opn->Bgs]: Inconsistent unix time to date | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122479@lists.php.net to get a copy of this message | ||
ID: 44177
Updated by: rasmus@php.net
Reported By: huferry at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Unix/Windows
PHP Version: 5.2CVS-2008-02-19 (snap)
New Comment:
You have discovered timezones.
Previous Comments:
------------------------------------------------------------------------
[2008-02-19 21:34:36] huferry at gmail dot com
Description:
------------
I have received a Unix time stamp from my database: 1208991600.
Using a phpMyAdmin it points to 24 April 2008. So does my local PHP
show it (using Windows).
On my web host (Linux), this time stamp is parsed by PHP as 23 April
2008.
An example of this script can be found at:
http://www.fmc-online.nl/unixtime.php5
If needed to check the phpinfo:
http://www.fmc-online.nl/info.php5
Reproduce code:
---------------
$ts = 1208991600;
echo "timestamp = $ts <br>";
echo "php date/time = ".date("d-m-Y", $ts);
Expected result:
----------------
timestamp = 1208991600
php date/time = 24-04-2008
Actual result:
--------------
timestamp = 1208991600
php date/time = 23-04-2008
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44177&edit=1