Steps to reproduce:
-------------------
- go to Time Off / Configuration / Public Holidays;
- create a public holiday (for one day):
start = 00:00:00
end = 23:59:59
- go to Time Off dashboard.
Issue:
------
The description of this public holiday is not correct.
The display shows that the public holiday is two days instead of one.
Cause:
------
When recording a public holiday, dates are saved in UTC.
Depending on the offset (UTC offset), this can change the day.
When we send the date in iso format to the frontend,
we modify the hours, but not the day.
Solution:
---------
Apply the employee's timezone to the datetime object
before sending it to the frontend.
Note:
-----
The correction is on the server side,
as we use the `combine` method of the datetime object
before sending the result to the frontend.
Indeed, we modify the times and lose the information
needed to apply the timezone afterwards.
opw-3381894
closesodoo/odoo#126983
X-original-commit: 1268502b813d9b9173edb3851faef965df6be6fe
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>