Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FIX] web: date field in calendar no tz issue
The calendar should send to server: - for an all day event (all_day field on view): the date in UTC (ie. if we are on 22 august 2018 on UTC+2, not send 21 august 2018 22:00) - for a datetime event not all day: the UTC datetime corresponding to UTC (for 03:25 with UTC+5 timezone, we send 22:25 the day before) - for a date event: the date in UTC (ie. same as all day) The current code was alright for datetime, but there was a missing case if the start_date was a Date field (eg. project task calendar view uses a date_deadline Date field) and not a Datetime field. This changeset apply the same behavior as an all_day event to a calendar with a start date that is a Date field. Note: the issue happen since 11.0's 03d74f4 (26th march 2019) that solved a similar case but for datetime (a datetime event at 8:00 with timezone UTC+9 would be moved the previous day when drag and dropped on the month view). opw-1969876 opw-1971106 opw-1971019 closes #32796 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
- Loading branch information
Showing
2 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters