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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 - 7 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Mar 29 09:01:28 2024 UTC