Edit report at https://bugs.php.net/bug.php?id=60332&edit=1

 ID:                 60332
 Updated by:         der...@php.net
 Reported by:        nazar-pc at yandex dot ru
 Summary:            timezone_abbreviations_list() returns incorrect time
                     offset
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Date/time related
 Operating System:   Ubuntu Linux 11.10
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 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

It also tells you between which timestamps those UTC offsets were valid. If you 
run zdump -v Europe/Kiev on the command line, you get the same output:

Europe/Kiev  Wed Dec 31 21:57:55 1879 UTC = Wed Dec 31 23:59:59 1879 LMT 
isdst=0 gmtoff=7324
Europe/Kiev  Wed Dec 31 21:57:56 1879 UTC = Thu Jan  1 00:00:00 1880 KMT 
isdst=0 gmtoff=7324
Europe/Kiev  Thu May  1 21:57:55 1924 UTC = Thu May  1 23:59:59 1924 KMT 
isdst=0 gmtoff=7324
Europe/Kiev  Thu May  1 21:57:56 1924 UTC = Thu May  1 23:57:56 1924 EET 
isdst=0 gmtoff=7200
Europe/Kiev  Fri Jun 20 21:59:59 1930 UTC = Fri Jun 20 23:59:59 1930 EET 
isdst=0 gmtoff=7200
Europe/Kiev  Fri Jun 20 22:00:00 1930 UTC = Sat Jun 21 01:00:00 1930 MSK 
isdst=0 gmtoff=10800
Europe/Kiev  Fri Sep 19 20:59:59 1941 UTC = Fri Sep 19 23:59:59 1941 MSK 
isdst=0 gmtoff=10800
Europe/Kiev  Fri Sep 19 21:00:00 1941 UTC = Fri Sep 19 23:00:00 1941 CEST 
isdst=1 gmtoff=7200
Europe/Kiev  Mon Nov  2 00:59:59 1942 UTC = Mon Nov  2 02:59:59 1942 CEST 
isdst=1 gmtoff=7200
Europe/Kiev  Mon Nov  2 01:00:00 1942 UTC = Mon Nov  2 02:00:00 1942 CET 
isdst=0 gmtoff=3600
Europe/Kiev  Mon Mar 29 00:59:59 1943 UTC = Mon Mar 29 01:59:59 1943 CET 
isdst=0 gmtoff=3600
Europe/Kiev  Mon Mar 29 01:00:00 1943 UTC = Mon Mar 29 03:00:00 1943 CEST 
isdst=1 gmtoff=7200
Europe/Kiev  Mon Oct  4 00:59:59 1943 UTC = Mon Oct  4 02:59:59 1943 CEST 
isdst=1 gmtoff=7200
Europe/Kiev  Mon Oct  4 01:00:00 1943 UTC = Mon Oct  4 02:00:00 1943 CET 
isdst=0 gmtoff=3600
Europe/Kiev  Fri Nov  5 22:59:59 1943 UTC = Fri Nov  5 23:59:59 1943 CET 
isdst=0 gmtoff=3600
Europe/Kiev  Fri Nov  5 23:00:00 1943 UTC = Sat Nov  6 02:00:00 1943 MSK 
isdst=0 gmtoff=10800
Europe/Kiev  Tue Mar 31 20:59:59 1981 UTC = Tue Mar 31 23:59:59 1981 MSK 
isdst=0 gmtoff=10800
Europe/Kiev  Tue Mar 31 21:00:00 1981 UTC = Wed Apr  1 01:00:00 1981 MSD 
isdst=1 gmtoff=14400
Europe/Kiev  Wed Sep 30 19:59:59 1981 UTC = Wed Sep 30 23:59:59 1981 MSD 
isdst=1 gmtoff=14400
Europe/Kiev  Wed Sep 30 20:00:00 1981 UTC = Wed Sep 30 23:00:00 1981 MSK 
isdst=0 gmtoff=10800
Europe/Kiev  Wed Mar 31 20:59:59 1982 UTC = Wed Mar 31 23:59:59 1982 MSK 
isdst=0 gmtoff=10800
Europe/Kiev  Wed Mar 31 21:00:00 1982 UTC = Thu Apr  1 01:00:00 1982 MSD 
isdst=1 gmtoff=14400
...
Europe/Kiev  Sun Mar 27 00:59:59 2011 UTC = Sun Mar 27 02:59:59 2011 EET 
isdst=0 gmtoff=7200
Europe/Kiev  Sun Mar 27 01:00:00 2011 UTC = Sun Mar 27 04:00:00 2011 EEST 
isdst=1 gmtoff=10800
Europe/Kiev  Sun Oct 30 00:59:59 2011 UTC = Sun Oct 30 03:59:59 2011 EEST 
isdst=1 gmtoff=10800
Europe/Kiev  Sun Oct 30 01:00:00 2011 UTC = Sun Oct 30 03:00:00 2011 EET 
isdst=0 gmtoff=7200
Europe/Kiev  Sun Mar 25 00:59:59 2012 UTC = Sun Mar 25 02:59:59 2012 EET 
isdst=0 gmtoff=7200
Europe/Kiev  Sun Mar 25 01:00:00 2012 UTC = Sun Mar 25 04:00:00 2012 EEST 
isdst=1 gmtoff=10800
Europe/Kiev  Sun Oct 28 00:59:59 2012 UTC = Sun Oct 28 03:59:59 2012 EEST 
isdst=1 gmtoff=10800
Europe/Kiev  Sun Oct 28 01:00:00 2012 UTC = Sun Oct 28 03:00:00 2012 EET 
isdst=0 gmtoff=7200
Europe/Kiev  Sun Mar 31 00:59:59 2013 UTC = Sun Mar 31 02:59:59 2013 EET 
isdst=0 gmtoff=7200


It just shows that in the past, it was different.


Previous Comments:
------------------------------------------------------------------------
[2012-03-22 21:40:06] nazar-pc at yandex dot ru

But why it returns mean solar time?
After changing of timezone to Europe/Kiev, time on site offsets on +2 hours, 
and it is obvious, that I expect to obtain the same value in returned array, 
but observe such unexpected behaviour (who needs this?).

So, if this function returns mean solar time, how to get true time offsets for 
each timezone correctly?

------------------------------------------------------------------------
[2012-03-22 21:27:01] jdmcadam at hotmail dot com

The documentation on this isn't very clear, but the array that is returned has 
multiple timezones for most locations, organized by timezone abbreviation (ex 
CET, GMT, PST). In this case, Europe/Kiev shows up under 7 different timezones 
with offsets ranging from UTC+1 (no DST) to UTC+4. One of these is mean solar 
time which, for Kiev, is UTC +7324 seconds (based on distance from 0 deg of 
longitude). At 24hrs = 360°, 7324sec = 30.51667°E, which runs straight 
through Kiev.

------------------------------------------------------------------------
[2011-11-19 01:59:51] nazar-pc at yandex dot ru

PHP version corrected

------------------------------------------------------------------------
[2011-11-19 01:57:45] nazar-pc at yandex dot ru

Description:
------------
---
>From manual page: http://www.php.net/datetimezone.listabbreviations
---

Function timezone_abbreviations_list() returns incorrect values of time offset.
For example, I live in Ukraine, Kiev (timezone Europe/Kiev) with time offset +2 
hours, but function returns value, that equals to +2:02:04 (in seconds 7324), 
similar problems are for other timezones.
Other cities in my country has the same offset +2 hours, but function returns 
other values from interval +2 till +3 hours, why?

But functions, which works with time after changing of timezone return correct 
values, so, the problem is only in this function.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60332&edit=1

Reply via email to