`advancedFormat`'s `z` outputs offset instead of abbreviated offset name for Central European Standard Time
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Using the advanced formatting for the abbreviated timezone outputs the offset instead of the abbreviation of the name:
GMT+1 instead of CEST for Europe/Berlin
Please see the behavior in this stackblitz
Expected behavior
From the docs and the EST example (see screenshot), I'd expect
dayjs().tz('Europe/Berlin').format('hh:mmA z');
to output e.g.
11:07AM CEST instead of 11:07AM GMT+1
Central European Time on wikipedia
Information
- Day.js Version [1.10.7]
- OS: [Windows]
- Browser [Version 96.0.4664.45 (Official Build) (64-bit)]
- Time zone: [e.g. GMT+1 CEST (Central European Summer Time)]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the advancedFormat z behavior from the linked StackBlitz with dayjs().tz('Europe/Berlin').format('hh:mmA z'); compare the result with the advanced-format documentation and timezone context in the issue. Done means the Berlin example returns an abbreviated timezone name such as CEST rather than GMT+1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100