How to get UTC offset in javascript (analog of TimeZoneInfo.GetUtcOffset in C#)
Vadim’s answer might get you some decimal points after the division by 60; not all offsets are perfect multiples of 60 minutes. Here’s what I’m using to format values for ISO 8601 strings: function pad(value) { return value < 10 ? ‘0’ + value : value; } function createOffset(date) { var sign = (date.getTimezoneOffset() > … Read more