New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] web: date field in calendar no tz issue #32796
Conversation
16a2baa
to
0759e1a
Compare
0759e1a
to
97c5191
Compare
}, | ||
session: { | ||
getTZOffset: function () { | ||
return -2400; // 40 hours timezone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't represent reality...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to 120 (2 hours) so without the test fail with [day before expected days] 22:00:00
instead of with the fix: [expected day] 00:00:00
|
97c5191
to
6228829
Compare
thanks updated, the commit in 6228829b5ccc1 and the missing number on opw was a typo, this was opw-1969876 and commit message has been updated |
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 odoo#32796
6228829
to
011998d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robodoo r+
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>
Merged, thanks! |
The calendar should send to server:
we are on 22 august 2018 on UTC+2, not send 21 august 2018 22:00)
UTC (for 03:25 with UTC+5 timezone, we send 22:25 the day before)
The current code was alright for datetime, but there was a missing case
if the start_date was a Date field and not a Datetime field that is
fixed with this changeset.
opw-1969876
opw-1971106
opw-1971019