moment-timezone gives inconsistence timezone abbrevation

25 views Asked by At

I'm experiencing inconsistent timezone abbreviations when using Moment-Timezone:

Case 1: When I use moment('2023-09-21T22:37:17.972Z').tz('Asia/Singapore').format('M/D/YY h:mm A (z)'), I get '9/22/23 6:37 AM (+08)', which displays the offset as '+08'.

Case 2: When I use moment('2023-09-21T22:37:17.972Z').tz('Asia/Kolkata').format('M/D/YY h:mm A (z)'), I get '9/22/23 4:07 AM (IST)', which displays 'IST' as the abbreviation.

I want to consistently display abbreviations like 'IST' instead of '+08'. How can I achieve this consistency?

0

There are 0 answers