Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We were using a hack to interpret a Date object as an UTC time: we were converting the Date to a string, and then adding a 'Z' suffix. This doesn't work great in practice unfortunately. Date.toString() returns a string which looks like this: "Mon Jun 24 2024 13:15:39 GMT+0200 (Central European Summer Time)" When we add the 'Z' prefix, it looks like this: "Mon Jun 24 2024 13:15:39 GMT+0200 (Central European Summer Time)Z" Some browsers are lax and just accept the string and ignore the final 'Z', so the Date object remains with the CEST timezone. Some browsers are less lax and reject the string, returning an invalid Date object. Instead of appending 'Z', use the dayjs utc(true) method to switch the timezone to UTC without adjusting the actual time. Closes: #7836
- Loading branch information