summaryrefslogtreecommitdiff
path: root/www/js/EventCtrl.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/EventCtrl.js')
-rw-r--r--www/js/EventCtrl.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index dfdbb779..f5719226 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -676,9 +676,10 @@ angular.module('zmApp.controllers')
disableBack: true
});
- var mToDate = moment();
-
- var mFromDate = moment().subtract(parseInt(val), unit);
+
+ // we have to convert from and to, to server time
+ var mToDate = moment().tz(NVRDataModel.getTimeZoneNow());
+ var mFromDate = moment().subtract(parseInt(val), unit).tz(NVRDataModel.getTimeZoneNow());
// console.log("Moment Dates:" + mFromDate.format() + " TO " + mToDate.format());