Started adding timezone support

This commit is contained in:
Andris Reinman 2016-04-29 14:57:13 +03:00
parent 33e075ecdc
commit 478237e60f
14 changed files with 191 additions and 9 deletions

View file

@ -1,6 +1,6 @@
/* eslint-env browser */
/* eslint prefer-arrow-callback: 0, object-shorthand: 0, new-cap: 0, no-invalid-this: 0, no-var: 0*/
/* globals $: false, moment: false */
/* globals $: false, moment: false, jstz: false */
'use strict';
@ -125,3 +125,13 @@ $('.page-refresh').each(function () {
window.location.reload();
}, interval * 1000);
});
if (typeof jstz !== 'undefined') {
(function () {
var tz = jstz.determine();
var tzname = tz && tz.name() || false;
if (tzname) {
$('.tz-detect').val(tzname);
}
})();
}