Last active
June 12, 2022 01:08
-
-
Save milksense/c5706efc1f830711e98ef3849eefbbb4 to your computer and use it in GitHub Desktop.
Improved Time Zone resolver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Improved Time Zone resolver | |
* | |
* @see {@link https://402.ecma-international.org/1.0/#sec-12.1} reference | |
* @see {@link https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat} reference | |
* @see {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones} reference | |
* | |
* @return {String|NULL} | |
*/ | |
console.log(Intl.DateTimeFormat().resolvedOptions().timeZone) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment