+This script does one thing and one thing alone. It gives you the zone info key of a timezone that describes the timezone you are in.
-If you are interested about the code details, read [[About_the_code|About the Code]].
+Download the latest minified version. Include it on a webpage. Then:
+var timezone = jstz.determine();
+If you are interested in the code details, read [[About_the_code|About the Code]].
[[Detection_List|Click here for a link to a list of timezones that the script can detect]].
Contact me: <<user pellepim>>, if you have any questions.
-=== How to use jsTimezoneDetect ===
+===What do I do with the result?===
+jsTimezoneDetect gives you a timezone key, compliant with the zoneinfo database. Often called the "Olson database", or simply the tz database. It is a public domain collaborative compilation of information about the world's timezones.
-To simply store away a user's timezone in a variable, you can simply import timezone_detect.js and do the following.
-var timezone = jstz.determine_timezone(); // Now you have an instance of the TimeZone object.
-alert(timezone.offset()); // Offset in hours and minutes from UTC.
-alert(timezone.name()); // Olson database timezone key (ex: Europe/Berlin)
-alert(timezone.dst()); // bool for whether the tz uses daylight saving time
-This gives you an Olson database key you can use for datetime calculations in most programming languages.
-Read more about the details in [[About_the_code|About the Code]].
+It is widely used as basis for timezone information in operating systems and software. Nearly all platforms and programming languages have libraries that support it.
=== Who would benefit from this script? ===