Date one day off
Closed this issue · 2 comments
wilco375 commented
How to reproduce
- Go to an edit page with a date field
- Enter a date
Expected behaviour
The entered date is saved
Current behaviour
Sometimes, the saved date is off by one day
wilco375 commented
It looks like, with a date field, the date is parsed in the local timezone but sent to the server in UTC. So 05-12-2022 00:00 UTC+2 becomes 04-12-2022 22:00 UTC, which is then saved as 04-12-2022.
DrumsnChocolate commented
So 05-12-2022 00:00 UTC+2 becomes 04-12-2022 22:00 UTC, which is then saved as 04-12-2022.
What does it mean for it to 'be saved as 04-12-2022' ? Does that mean that it is changed by the backend from 04-12-2022 22:00 to 04-12-2022 00:00 ? Shouldn't we be able to simply save it as 04-12-2022 22:00, which then translates via displaying with respect for locale to 05-12-2022 00:00 again?