From ff30b75d078769b2ff862e53620321e78ad1b62e Mon Sep 17 00:00:00 2001 From: Martronic SA Date: Thu, 2 Sep 2021 09:47:19 +0200 Subject: [PATCH] Fix timezone and + 1 hour when adding events Date times must be sent as UTC to Odoo. and why adding 1 hour? just leave the javascript timeline make the job. --- web_timeline/static/src/js/timeline_controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_timeline/static/src/js/timeline_controller.js b/web_timeline/static/src/js/timeline_controller.js index 3cb8fb4ae..1fbcaef9f 100644 --- a/web_timeline/static/src/js/timeline_controller.js +++ b/web_timeline/static/src/js/timeline_controller.js @@ -288,12 +288,12 @@ odoo.define('web_timeline.TimelineController', function (require) { default_context['default_'.concat(this.date_delay)] = 1; } if (this.date_start) { - default_context['default_'.concat(this.date_start)] = moment(item.start).add(1, 'hours').format( + default_context['default_'.concat(this.date_start)] = moment.utc(item.start).format( 'YYYY-MM-DD HH:mm:ss' ); } if (this.date_stop && item.end) { - default_context['default_'.concat(this.date_stop)] = moment(item.end).add(1, 'hours').format( + default_context['default_'.concat(this.date_stop)] = moment.utc(item.end).format( 'YYYY-MM-DD HH:mm:ss' ); }