Get utc offset from timezone in Javascript
It has become possible nowaday with Intl API: The implementation of Intl is based on icu4c. If you dig the source code, you’ll find that timezone name differs per locale, for example: for (const locale of [“ja”, “en”, “fr”]) { const timeZoneName = Intl.DateTimeFormat(locale, { timeZoneName: “short”, timeZone: “Asia/Tokyo”, }) .formatToParts() .find((i) => i.type === … Read more