I want to calculate the offset from 'users time' to 'WET/WEST'.
I get the users offset with new Date().getTimezoneOffset()
.
But how do I get the offset for WET/WEST So that I can calcluate the combined offset of both?
For example, if the user is in central europe time (CET/CEST), in winter the combined offset would be -60 (CET) + 0 (WET) = -60. In summer, it would be -120 (CEST) + 60 (WEST) = -60. In this case it is always -60 but the user could also have a timezone without DST.
Is this possible without format it to a string and read out the new timezone from that string?
Date.prototype.toString
since it's implementation dependent. The timezone may be missing, ambiguous or indecipherable. – RobGmyDateLib.getTimezoneOffset('WET')
ormyDateLib.getTimezoneOffset('LHDT')
ormyDateLib.getTimezoneOffset('Australia/Lord_Howe')
. – RobG