|
|
|
|
|
by amiruci2
4701 days ago
|
|
I looked into getTimezoneOffset when implementing pre-orders here at Gumroad and realized that technically this is incorrect: "Luckily, the browser already knows what timezone the user is currently in, so we can make use of the getTimezoneOffset() function" Getting the timezone offset isn't the same as getting the timezone. Granted that in certain cases having the offset is good enough, but sometimes you need the actual timezone. In my example I needed to know when a merchant wants their pre-order to be released. For that to work predictably I needed to know their exact timezone in order to adjust the time for daylight saving properly. Remember that there are quite a few timezones that are UTC-7 and they can behave differently in regards to daylight saving. |
|