diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-28 08:23:30 -0700 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-28 08:23:30 -0700 |
| commit | ba1b224dbc8553a25f9307125ff2f0004602d609 (patch) | |
| tree | e35abd1a1fafbde4af923d990c95e529a4106e2c /www/js/TimelineCtrl.js | |
| parent | 86ffc8d962c3e4b677a555f215c3dac5e2eabef4 (diff) | |
#353 - show abbreviated timezones to avoid confusion when switching, broadcast tz change if APIs update late
Diffstat (limited to 'www/js/TimelineCtrl.js')
| -rw-r--r-- | www/js/TimelineCtrl.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index 16b809b9..fa8d8cea 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -266,7 +266,10 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla } - + $rootScope.$on('tz-updated', function() { + $scope.tzAbbr = NVRDataModel.getTimeZoneNow(); + NVRDataModel.debug ("Timezone API updated timezone to " + NVRDataModel.getTimeZoneNow()); + }); @@ -315,6 +318,16 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla $scope.modalFromTimelineIsOpen = false; var tempMon = message; + + // lets get the abbreviated version of TZ to display + if (NVRDataModel.getLogin().useLocalTimeZone) + { + $scope.tzAbbr = moment().tz(moment.tz.guess()).zoneAbbr(); + } + else + { + $scope.tzAbbr = moment().tz(NVRDataModel.getTimeZoneNow()).zoneAbbr(); + } //console.log ("TIMELINE MONITORS: " + JSON.stringify(message)); var ld = NVRDataModel.getLogin(); |
