StackExchange sites - convert dates to local timezone

Converts dates to your local timezone

Από την 15/12/2015. Δείτε την τελευταία έκδοση.

Δημιουργός
darkred
Βαθμολογίες
0 0 0
Έκδοση
1
Δημιουργήθηκε την
15/12/2015
Ενημερώθηκε την
15/12/2015
Μέγεθος
3 KB
Άδεια
Μη διαθέσιμη
Εφαρμόζεται σε

This script applies to StackExchange sites stackoverflow.com, stackexchange.com, superuser.com, etc. The timezone that the StackExchange sites use is UTC i.e. +0000 (source) So, this script converts the dates to your local timezone, in both:

  • tooltips 2015-12-14 14:11:13Z, and in
  • date text like Dec 14 at 14:11.

It also recalculates them whenever the page changes.


It uses the jsTimezoneDetect JavaScript script (for getting the local timezone), and the Moment.js and Moment-Timezone JavaScript libraries (for converting the dates). Also note: jsTimezoneDetect does not do geo-location, nor does it care very much about historical time zones. e.g. it may get "Europe/Berlin" when the user is in fact in "Europe/Stockholm" (they are both identical in modern time).