Bug #74835 [Opn->Nab]: Timezone abbreviations missing for some timezones (e.g. ICT)

From: Date: Tue, 04 Jul 2017 05:34:34 +0000
Subject: Bug #74835 [Opn->Nab]: Timezone abbreviations missing for some timezones (e.g. ICT)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209796@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74835&edit=1 ID: 74835 Updated by: heiglandreas@php.net Reported by: 6ec883313e at gmail dot com Summary: Timezone abbreviations missing for some timezones (e.g. ICT) -Status: Open +Status: Not a bug Type: Bug Package: Date/time related PHP Version: 7.1.6 Block user comment: N Private report: N New Comment: This is not a bug but an intended behaviour from the underlying timezone-database. 6 months ago a lot of invented timezone-abbreviations where removed. "ICT" was one of them. As there is not an official abbreviation for the local timezone the abbreviation was removed and replaced with the offset. For details see https://github.com/eggert/tz/blame/master/asia#L3035 This shows: You should NEVER depend on timezone-abbreviations as they change! Previous Comments: ------------------------------------------------------------------------ [2017-06-30 12:55:59] 6ec883313e at gmail dot com Description: ------------ Timezone is shown as an offset instead of an abbreviation when formatting DateTime using T format character in some specific timezones such as Asia/Bangkok or Asia/Oral. It seems to be broken since PHP 7.0.9. It worked well before. https://3v4l.org/SekI1 Test script: --------------- $now = new DateTime('now', new DateTimeZone('Asia/Bangkok')); echo $now->format('T'); Expected result: ---------------- ICT Actual result: -------------- +07 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74835&edit=1

« previous php.bugs (#209796) next »