dayjs icon indicating copy to clipboard operation
dayjs copied to clipboard

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

Open changchanghwang opened this issue 3 years ago • 3 comments

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)]

changchanghwang avatar Jul 21 '22 07:07 changchanghwang

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

Bykiev avatar Jul 21 '22 17:07 Bykiev

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 avatar Jul 22 '22 00:07 changchanghwang

there is no plan to update? @iamkun

changchanghwang avatar Jul 22 '22 05:07 changchanghwang