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

dayjs.tz(timezone).format('z') is not Abbreviations #1995

Open
changchanghwang opened this issue Jul 21, 2022 · 3 comments
Open

dayjs.tz(timezone).format('z') is not Abbreviations #1995

changchanghwang opened this issue Jul 21, 2022 · 3 comments

Comments

@changchanghwang
Copy link

Describe the bug
I try
dayjs.tz('Asia/Seoul').format('z')
but return is
GMT+9

expect: KST

Information

  • Day.js Version [e.g. v1.0.0]
  • OS: [e.g. iOS]
  • Browser [e.g. chrome 62]
  • Time zone: [e.g. GMT-07:00 DST (Pacific Daylight Time)]
@Bykiev
Copy link

Bykiev commented Jul 21, 2022

Unfortunately, right now localized timezone names are not supported.
But if you wish to display dt as 2022-07-21 00:00:00 KST you could use this code dayjs().tz("Asia/Seoul").format("YYYY-DD-MM HH:mm:ss [KST]");
small demo

@changchanghwang
Copy link
Author

Unfortunately, right now localized timezone names are not supported. But if you wish to display dt as 2022-07-21 00:00:00 KST you could use this code dayjs().tz("Asia/Seoul").format("YYYY-DD-MM HH:mm:ss [KST]"); small demo

thank you for answer... hard coding is the only answer...

@changchanghwang
Copy link
Author

there is no plan to update? @iamkun

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

No branches or pull requests

2 participants