I have a case where I am trying to calculate timezoneOffset from selected timezone.
The sample I am saving the time in the database as UTC format, Now I am calculating the timezone as per user's location/timezone and setting the timezone offset.
How I can create mapping that -330
offset if from which timezone, I want to calculate it for all the timezone. Example [{ timezone: 'Australia/Sydney', offset: '660' }] and so on..
such that I can search for -330 offset is for which timeozne.
Suppose -330 offset if for which timezone? Where I can create mapping with offset and timezone.
Example User a is from Australia/Sydney
then how can I check timezone offset from UTC?
Just a note that I have multiple timezones to support overall more than 30 time zones.
And I want something very accurate calculation.
I know momentjs using it I can do, but suddenly don't know-how.
with momentjs I get UTCoffser of Australia/Sydney
//660
Can anyone help me derive the accurate date here?