summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/backend
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-10 15:20:01 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-10 15:20:01 +0200
commit243a4ae5cbc07027cd3eaf0ead036b9d3586dea3 (patch)
treea7fc43164bf3926a6c30d63f9573e6f23fc2d20c /addons/website/static/src/js/backend
parent9530f1071d816d76194ee57711192f709e4d4d19 (diff)
parent330b99f60c0fcc09e2438a1958d11bf7e1383d8d (diff)
[MERGE] forward port branch saas-12.1 up to 330b99f60c0
Diffstat (limited to 'addons/website/static/src/js/backend')
-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;