Bug #74835 [Com]: Timezone abbreviations missing for some timezones (e.g. ICT)

From: Date: Wed, 06 Feb 2019 21:02:08 +0000
Subject: Bug #74835 [Com]: Timezone abbreviations missing for some timezones (e.g. ICT)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219394@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 Comment by: Sawickamonika at yahoo dot com Reported by: 6ec883313e at gmail dot com Summary: Timezone abbreviations missing for some timezones (e.g. ICT) Status: Not a bug Type: Bug Package: Date/time related PHP Version: 7.1.6 Block user comment: N Private report: N New Comment: So how to display abbreviations for example for America/Sao_Paulo or Asia/Dubai? There is no replacement timezone identifier which would have valid abbreviation for the same offset. Previous Comments: ------------------------------------------------------------------------ [2017-07-04 05:34:28] heiglandreas@php.net 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! ------------------------------------------------------------------------ [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 (#219394) next »