diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-05-13 11:02:27 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-05-13 11:02:27 +0200 |
| commit | 60e71302a38b36214efec1213882f573e3ea453c (patch) | |
| tree | d6c4f548ac29c94891a52444887a230a7c30d403 /addons/website/static/src | |
| parent | 3936d655c4bfd845b6ead724cecdc8e7c62816eb (diff) | |
| parent | 243a4ae5cbc07027cd3eaf0ead036b9d3586dea3 (diff) | |
[MERGE] forward port branch saas-12.2 up to 243a4ae5cbc
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/js/backend/dashboard.js | 10 |
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 83c16278b6d..dda40102904 100644 --- a/addons/website/static/src/js/backend/dashboard.js +++ b/addons/website/static/src/js/backend/dashboard.js @@ -45,8 +45,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 = []; @@ -303,13 +303,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; |
