php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53078 Europe/London is in two timezones
Submitted: 2010-10-15 23:21 UTC Modified: 2010-10-16 03:27 UTC
From: gixx at freemail dot hu Assigned:
Status: Not a bug Package: Calendar related
PHP Version: 5.3.3 OS: Ubuntu Linux 10.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gixx at freemail dot hu
New email:
PHP Version: OS:

 

 [2010-10-15 23:21 UTC] gixx at freemail dot hu
Description:
------------
I was about to create a timezone selector widget with map and select box with the timezone IDs, but when I asked for the full timezone list with DateTimeZone::listAbbreviations() I saw that Europe/London is in two different timezones according to the Greenwich Mean Time:

- "bdst": DST is TRUE, offset is GMT+2 hours (== DST:false and GMT+1)
- "bst":  offset is GMT+1 hour and DST doesn't matter, both TRUE (== GMT+0) and FALSE (== GMT+1) can be found
- "gmt":  DST is FALSE, offset is GMT+0. It is GMT of course :)

How can this be possible?

Test script:
---------------
<?php

$dtz = DateTimeZone::listAbbreviations();
die('<pre>'.print_r($dtz, true).'</pre>');

// and search for 'Europe/London' or see description below




Expected result:
----------------
GMT+1 in Summer and GMT+0 otherwise. Something like:

["bst"] => array(25) {
    [0] => array(3) {
      ["dst"] => bool(true)
      ["offset"] => int(3600)
      ["timezone_id"] => string(13) "Europe/London"
    }
    ...
}
...
["gmt"] => array(30) {
    ...
    [26] => array(3) {
      ["dst"] => bool(false)
      ["offset"] => int(0)
      ["timezone_id"] => string(13) "Europe/London"
    }
    ...
}


Actual result:
--------------
...
["bdst"] => array(8) {
   [0] => array(3) {
      ["dst"] => bool(true)
      ["offset"] => int(7200)
      ["timezone_id"] => string(13) "Europe/London"
   }
   ...
}
...
["bst"] => array(25) {
    [0] => array(3) {
      ["dst"] => bool(false)
      ["offset"] => int(3600)
      ["timezone_id"] => string(13) "Europe/London"
    }
    [1] => array(3) {
      ["dst"] => bool(true)
      ["offset"] => int(3600)
      ["timezone_id"] => string(13) "Europe/London"
    }
    ...
}
...
["gmt"] => array(30) {
    ...
    [26] => array(3) {
      ["dst"] => bool(false)
      ["offset"] => int(0)
      ["timezone_id"] => string(13) "Europe/London"
    }
    ...
}
...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-16 03:27 UTC] cataphract@php.net
-Status: Open +Status: Bogus
 [2010-10-16 03:27 UTC] cataphract@php.net
That's simply because there were times Europe/London had an 1 hour offset to GMT (2 in the summer).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC