|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-10-16 03:27 UTC] cataphract@php.net
-Status: Open
+Status: Bogus
[2010-10-16 03:27 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 07:00:01 2025 UTC |
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" } ... } ...