#41991 [Opn->Bgs]: Translating from a timezone to itself does not return 0
| From: | derick@php.net | Date: | Fri, 13 Jul 2007 13:31:01 +0000 |
| Subject: | #41991 [Opn->Bgs]: Translating from a timezone to itself does not return 0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-115034@lists.php.net to get a copy of this message | ||
ID: 41991
Updated by: derick@php.net
Reported By: Arne dot Heizmann at csr dot com
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Windows 2000
PHP Version: 5.2.3
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
The function returns the offset to *GMT*, not to each other. This is
also mentioned in the documentation:
http://no.php.net/manual/en/function.timezone-offset-get.php
Previous Comments:
------------------------------------------------------------------------
[2007-07-13 13:27:10] Arne dot Heizmann at csr dot com
Description:
------------
Translating from a timezone to itself does not return 0.
Reproduce code:
---------------
<?php
$dateTimeZone1 = new DateTimeZone ("Europe/London");
$dateTimeZone2 = new DateTimeZone ('Europe/London');
$dateTime1 = new DateTime ("now", $dateTimeZone1);
$dateTime2 = new DateTime ("now", $dateTimeZone2);
echo $dateTimeZone1->getOffset($dateTime2) . "\n";
echo $dateTimeZone2->getOffset($dateTime1) . "\n";
?>
Expected result:
----------------
0
0
Actual result:
--------------
3600
3600
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41991&edit=1