php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48178 Error in test DateTimeZone_getOffset_basic1.phpt
Submitted: 2009-05-07 10:28 UTC Modified: 2009-12-23 16:17 UTC
From: tobias dot john at fondsnet dot de Assigned:
Status: Closed Package: Date/time related
PHP Version: 5.3.0RC1 OS: *
Private report: No CVE-ID: None
 [2009-05-07 10:28 UTC] tobias dot john at fondsnet dot de
Description:
------------
The Europe/London timezone switched to daylight saving.

See: http://www.convertunits.com/time/zone/Europe/London
The GMT timezone has no daylight saving.

So the offset of the Europe/London timezone ist either 0 or 3600 not always 0.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-07 10:55 UTC] tobias dot john at fondsnet dot de
Ups sorry. Postet the wrong patch.

This is the correct one.

--- DateTimeZone_getOffset_basic1.phpt.orig	2009-05-07 12:30:07.000000000 +0200
+++ DateTimeZone_getOffset_basic1.phpt	2009-05-07 12:30:53.000000000 +0200
@@ -27,7 +27,7 @@
 ===DONE===
 --EXPECTF--
 *** Testing DateTimeZone::getOffset() : basic functionality ***
-int(0)
+%rint\(0\)|int\(3600\)%r
 %rint\(-18000\)|int\(-14400\)%r
 %rint\(-28800\)|int\(-25200\)%r
 ===DONE===
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC