Req #81194 [NEW]: Get Timezone abbreviation
| From: | syl dot fabre at gmail dot com | Date: | Wed, 23 Jun 2021 07:58:08 +0000 |
| Subject: | Req #81194 [NEW]: Get Timezone abbreviation | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-234597@lists.php.net to get a copy of this message | ||
From: syl dot fabre at gmail dot com
Operating system: Irrelevant
PHP version: Irrelevant
Package: Date/time related
Bug Type: Feature/Change Request
Bug description:Get Timezone abbreviation
Description:
------------
PHP uses the tz database for timezone with names like America/New_York.
But most people in the US use abbreviated names like EST (for instance
https://www.juneteenthny.com/schedule)
This abbreviated name can be found with (new \DateTime('now',
'America/New_York'))->format('T') as explained in this comment:
https://www.php.net/manual/en/function.timezone-abbreviations-list.php#97472
I would expect to get this abbreviation from a public method of
\DateTimeZone with something like this:
$tz = new \DateTimeZone('America/New_York');
$tz->getAbbreviation();
--
Edit bug report at https://bugs.php.net/bug.php?id=81194&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81194&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81194&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81194&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81194&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81194&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81194&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81194&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81194&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81194&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81194&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81194&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81194&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81194&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81194&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81194&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81194&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81194&r=mysqlcfg