moment-timezone icon indicating copy to clipboard operation
moment-timezone copied to clipboard

Can't get timezone name using "z" format.

Open joemarieandres opened this issue 4 years ago • 1 comments

0.5.32

Version:

Note: many issues are resolved if you just upgrade to the latest version

Issue description:

I am going to get timezone name like "PST" etc. But when I use format('z'), it gives me only offset not timezone name How can I get the timezone name?

joemarieandres avatar Feb 05 '21 08:02 joemarieandres

Which time zone(s) are you trying to get the abbreviation for? Not all time zones have proper abbreviations assigned. There's a small note about this in the formatting documentation:

Please note that the z formatting token will not always show the abbreviated time zone name, instead, will show the time offsets for each region.

gilmoreorless avatar Feb 16 '21 22:02 gilmoreorless

@joemarieandres please check https://github.com/moment/moment-timezone/issues/723

ichernev avatar Aug 25 '22 15:08 ichernev