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.
pull/2013/head
Martronic SA 2021-09-02 09:47:19 +02:00 committed by GitHub
parent c420cfb554
commit ff30b75d07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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'
);
}