Bug #80084 [NEW]: Incorrect UTC offset per Olson TZ Database in Asia/Almaty.
| From: | kevin at arcpointgroup dot com | Date: | Thu, 10 Sep 2020 18:04:54 +0000 |
| Subject: | Bug #80084 [NEW]: Incorrect UTC offset per Olson TZ Database in Asia/Almaty. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228957@lists.php.net to get a copy of this message | ||
From: kevin at arcpointgroup dot com
Operating system: Ubuntu 18.04.2 LTS
PHP version: 7.3.22
Package: Date/time related
Bug Type: Bug
Bug description:Incorrect UTC offset per Olson TZ Database in Asia/Almaty.
Description:
------------
Date Extension Settings (default for PHP 7.3):
```
date/time support enabled
timelib version 2018.03
"Olson" Timezone Database Version 2020.1
Timezone Database internal
Default timezone UTC
```
According to the Olson Timezone Database, the UTC offset value for
timezone Asia/Almaty for 1986-06-01T00:00:00 should be either +5 or +6
hours. (If daylight savings time is observed, then the offset will be +6
hours.) PHP returns +7 hours.
See the timezone rule for this timezone that has been in place for 5
years (prior to PHP 7.3):
https://github.com/eggert/tz/blame/cb2d288ae0bb3aa5fb7cc94480ea955ff76bd183/asia#L2332
Here is an additional reference indicating the appropriate UTC offset
for this timezone and aforementioned date should be +6 hours:
http://en.timeofdate.com/city/Kazakhstan/Kostanay/timezone/change?start=1980
(Kostanay, Kazakhstan uses the Asia/Almaty timezone.)
Test script:
---------------
$dt = new DateTime('1986-06-01 00:00:00', new
DateTimeZone('Asia/Almaty'));
echo $dt->format('Z');
Expected result:
----------------
21600
Actual result:
--------------
25200
--
Edit bug report at https://bugs.php.net/bug.php?id=80084&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80084&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80084&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80084&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80084&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80084&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80084&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80084&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80084&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80084&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80084&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80084&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80084&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80084&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80084&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80084&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80084&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80084&r=mysqlcfg