summaryrefslogtreecommitdiff
path: root/www/js/DataModel.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-10-21 09:14:48 -0400
committerPliable Pixels <pliablepixels@gmail.com>2016-10-21 09:14:48 -0400
commitc24e0850bddaf1d96df01131f5647dea6eaf04f2 (patch)
treebe4f6d8d2b569013a5db4496424723d427e58bfe /www/js/DataModel.js
parent29762558bffe6ce7999b9952ec506ec027b117ce (diff)
#353 - help text
Former-commit-id: 104d01c126fd6120291b2d250b699aa0eac0def6
Diffstat (limited to 'www/js/DataModel.js')
-rw-r--r--www/js/DataModel.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index ae201667..ba74039f 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -27,6 +27,7 @@ angular.module('zmApp.controllers')
var migrationComplete = false;
var tz = "";
+ var isTzSupported = false;
var languages = [
@@ -1485,11 +1486,17 @@ angular.module('zmApp.controllers')
// returns server timezone, failing which local timezone
// always resolves true
+ isTzSupported: function()
+ {
+ return isTzSupported;
+ },
+
getTimeZone: function ()
{
var d = $q.defer();
if (!tz)
{
+
log ("First invocation of TimeZone, asking server");
var apiurl = loginData.apiurl + '/host/getTimeZone.json';
$http.get(apiurl)
@@ -1497,6 +1504,7 @@ angular.module('zmApp.controllers')
tz = success.data.tz;
d.resolve(tz);
debug ("Timezone API response is:"+success.data.tz);
+ isTzSupported = true;
return (d.promise);
},
@@ -1504,6 +1512,7 @@ angular.module('zmApp.controllers')
tz = moment.tz.guess();
debug("Timezone API error handler, guessing local:" + tz);
d.resolve(tz);
+ isTzSupported = false;
return (d.promise);
});