Reputation: 5055
I am using moment-timezone package to get current time zone values. I need value like America/New_york, Asia/KolKatta.
import * as Moment from 'moment-timezone';
Moment.tz.guess()
It works fine, but gives Asia/Calcutta instead of Asia/KolKatta. Another solution for getting timezone name I found is
Intl.DateTimeFormat().resolvedOptions().timeZone
Related Question on SO Moment Timezone returns correct timezone but with wrong spelling
Please suggest if someone knows the solution to fix this issue in Javascript?
Upvotes: 1
Views: 153