Skip to content

Commit

Permalink
Fix timezone and + 1 hour when adding events
Browse files Browse the repository at this point in the history
Date times must be sent as UTC to Odoo. and why adding 1 hour? just leave the javascript timeline make the job.
  • Loading branch information
Martronic-SA committed Sep 2, 2021
1 parent c420cfb commit ff30b75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web_timeline/static/src/js/timeline_controller.js
Expand Up @@ -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'
);
}
Expand Down

0 comments on commit ff30b75

Please sign in to comment.