summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/backend/dashboard.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/src/js/backend/dashboard.js')
-rw-r--r--addons/website/static/src/js/backend/dashboard.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/website/static/src/js/backend/dashboard.js b/addons/website/static/src/js/backend/dashboard.js
index ecc0dc4cb1d..aaf5813e4dc 100644
--- a/addons/website/static/src/js/backend/dashboard.js
+++ b/addons/website/static/src/js/backend/dashboard.js
@@ -33,8 +33,8 @@ var Dashboard = AbstractAction.extend({
this._super(parent, context);
this.date_range = 'week'; // possible values : 'week', 'month', year'
- this.date_from = moment().subtract(1, 'week');
- this.date_to = moment();
+ this.date_from = moment.utc().subtract(1, 'week');
+ this.date_to = moment.utc();
this.dashboards_templates = ['website.dashboard_header', 'website.dashboard_content'];
this.graphs = [];
@@ -229,13 +229,13 @@ var Dashboard = AbstractAction.extend({
on_date_range_button: function(date_range) {
if (date_range === 'week') {
this.date_range = 'week';
- this.date_from = moment().subtract(1, 'weeks');
+ this.date_from = moment.utc().subtract(1, 'weeks');
} else if (date_range === 'month') {
this.date_range = 'month';
- this.date_from = moment().subtract(1, 'months');
+ this.date_from = moment.utc().subtract(1, 'months');
} else if (date_range === 'year') {
this.date_range = 'year';
- this.date_from = moment().subtract(1, 'years');
+ this.date_from = moment.utc().subtract(1, 'years');
} else {
console.log('Unknown date range. Choose between [week, month, year]');
return;