Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

advancedFormat's z outputs offset instead of abbreviated offset name for Central European Standard Time #1713

Open
p6l-richard opened this issue Nov 25, 2021 · 9 comments · May be fixed by #2637

Comments

@p6l-richard
Copy link

p6l-richard commented Nov 25, 2021

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

image

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)]
@p6l-richard p6l-richard changed the title Abbreviated timezone from advancedFormat not showing advancedFormat's z outputs offset instead of abbreviated timezone name Nov 25, 2021
@p6l-richard p6l-richard changed the title advancedFormat's z outputs offset instead of abbreviated timezone name advancedFormat's z outputs offset instead of abbreviated offset name Nov 25, 2021
@p6l-richard p6l-richard changed the title advancedFormat's z outputs offset instead of abbreviated offset name advancedFormat's z outputs offset instead of abbreviated offset name for Central European Standard Time Nov 25, 2021
@vibhorpahare
Copy link

I am facing the same issue
Dayjs version : [1.10.6]
time zone : IST(Indian slandered time).

@m-heinemann
Copy link

I am facing the same issue
Dayjs version: [1.11.7]
time zone: most of them!

@bhavin-a
Copy link

I am facing the same issue. Any idea when this would be fixed or at least have the docs updated? Thanks. cc// @iamkun
image

@phalkone
Copy link

I know this is an old topic, but I am facing the same issue. Would have loved to use this feature.

@MikePrus
Copy link

The same thing, somebody found a solution for this?

@borkanee
Copy link

Same issue here, did anyone find a solution?

@stefanobartoletti
Copy link

I wanted to open an issue for this, but I see that it is an already known problem.

I can only add that it still happens with version 1.11.10

@klm-turing
Copy link
Contributor

@hi There, I opened a PR regarding this issue.

@hollandmatt
Copy link

I'm having the same issue with the AEST (Australian Eastern Standard Time) TZ. Present in version 1.11.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants