#28399 [Opn->Bgs]: Getting unixtime since 12/31/1969 21:00:00
| From: | iliaa@php.net | Date: | Fri, 14 May 2004 13:34:20 +0000 |
| Subject: | #28399 [Opn->Bgs]: Getting unixtime since 12/31/1969 21:00:00 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-59627@lists.php.net to get a copy of this message | ||
ID: 28399
Updated by: iliaa@php.net
Reported By: vinicius at teracom dot com dot br
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Red Hat 8.0
PHP Version: 4.3.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This data is retrieved from your OS, PHP has little to do
with this.
Previous Comments:
------------------------------------------------------------------------
[2004-05-14 15:23:17] vinicius at teracom dot com dot br
Description:
------------
I was testing unixtime from php and delphi and there is a difference
from one to another.
Php makes unixtime from 12/31/1969 21:00:00. Isn't it a bug? Unixtime
isn't from 01/01/1970 00:00:00 as you say in manual from function
strtotime:
'...This means that e.g. dates prior to Jan 1, 1970 will not work on
Windows, some Linux distributions, and a few other operating
systems....'
If it's because the time, isn't it needed another argument to define
it?
For example:
If i make a script using unixtime using -0300 timezone and, for some
reason, i move it to another system that uses timezone as GMT, some
results will be different.
Reproduce code:
---------------
<?
$unixtime = 0;
echo date("d/m/Y H:i:s", $unixtime) . "\r\n";
?>
Expected result:
----------------
01/01/1970 00:00:00
Actual result:
--------------
31/12/1969 21:00:00
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28399&edit=1