Nicolas Lempereur
f0ba2dbfa5
[FIX] web: no safari issue with DST at midnight
...
On safari with apple device in belgium timezone, this code:
```
x = new Date(2020, 2, 28, 2)
x.setDate(29)
```
returns:
> Sat Mar 28 2020 02:00:00 GMT+0100 (CET)
> Sun Mar 29 2020 01:00:00 GMT+0100 (CET)
This is not consistent with any other combination of OS and browser
tested, where this code would return eg. for chrome on macOS:
> Sat Mar 28 2020 02:00:00 GMT+0100 (Central European Standard Time)
> Sun Mar 29 2020 03:00:00 GMT+0200 (Central European Summer Time)
In most instance, this is not an issue, but for country with midnight as
Daylight Saving Time (DST) change, this is an issue, because the Tempus
Dominus calendar widget will have a duplicated day which might eg. make
a month totally not usable.
This issue can eg. be reproduced in Lebanon timezone at this address:
https://tempusdominus.github.io/bootstrap-4/Usage/
Going to the month of April 2020, an error happen because to get the
first day of the week of 1st April, we do:
```
this._viewDate.clone().startOf('M').startOf('w').startOf('d');
// .startOf('M') => Apr 01 00:00:00
// .startOf('w') => Mar 28 23:00:00 (safari bug)
// .startOf('d') => Mar 28 00:00:00
```
which gives us the wrong day (28 instead of 29) which causes an error.
Other report of the issue:
- https://www.donedone.com/timezone-specific-browser-specific-datetime-bug-2014/
- https://github.com/date-fns/date-fns : issue 571
- https://forum.mobiscroll.com/t/issue-with-invalid-dates-range-script/108
opw-2271482
closes #59786
closes odoo/odoo#59908
X-original-commit: 112267d62544c56acfdcef96727c32c314c15f16
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com >
2020-10-13 16:16:45 +00:00
..
2020-10-13 12:02:11 +00:00
2020-09-01 23:41:42 +00:00
2020-09-18 17:34:46 +00:00
2020-10-12 11:04:33 +00:00
2020-10-01 07:20:29 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-10-12 15:19:12 +00:00
2020-09-08 18:12:26 +00:00
2020-09-01 11:18:00 +00:00
2020-08-14 23:06:25 +00:00
2020-10-13 07:30:40 +00:00
2020-09-01 11:18:00 +00:00
2020-08-14 23:06:11 +00:00
2020-08-14 23:06:11 +00:00
2020-10-02 17:50:16 +00:00
2020-09-29 17:52:02 +00:00
2020-09-29 17:52:02 +00:00
2020-09-08 18:12:26 +00:00
2020-09-01 14:02:17 +00:00
2020-09-30 16:40:59 +00:00
2020-09-29 17:52:46 +00:00
2020-09-01 11:18:00 +00:00
2020-09-29 17:52:02 +00:00
2020-10-07 13:25:32 +00:00
2020-10-01 17:34:27 +00:00
2020-09-01 11:18:00 +00:00
2020-10-12 16:18:49 +00:00
2020-10-12 07:43:43 +00:00
2020-09-03 14:29:39 +00:00
2020-10-13 07:31:58 +00:00
2020-09-21 06:25:29 +00:00
2020-09-01 11:18:00 +00:00
2020-10-06 14:30:00 +00:00
2020-10-13 13:59:03 +00:00
2020-09-01 11:18:00 +00:00
2020-10-06 07:51:59 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-10-12 16:17:20 +00:00
2020-10-13 11:01:36 +00:00
2020-09-29 17:52:02 +00:00
2020-09-29 17:52:02 +00:00
2020-09-28 11:32:27 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-09-29 17:52:02 +00:00
2020-10-05 09:36:34 +00:00
2020-09-01 11:18:00 +00:00
2020-10-13 07:31:58 +00:00
2020-10-08 11:46:20 +00:00
2020-09-01 11:18:00 +00:00
2020-10-06 11:09:43 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-10-12 15:20:23 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-10-09 16:55:16 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-10-08 13:12:59 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-10-06 11:21:38 +00:00
2020-09-01 11:18:00 +00:00
2020-10-09 11:18:21 +00:00
2020-09-01 11:18:00 +00:00
2020-10-07 15:44:11 +00:00
2020-08-28 19:36:12 +00:00
2020-09-17 16:14:13 +00:00
2020-08-21 07:34:27 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-10-08 08:12:40 +00:00
2020-09-01 11:18:00 +00:00
2020-08-07 08:30:41 +00:00
2020-10-13 14:19:24 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-09-10 11:50:53 +00:00
2020-09-10 13:28:34 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-09-29 15:16:16 +00:00
2020-09-15 08:46:17 +00:00
2020-10-08 20:27:23 +00:00
2020-08-07 08:30:41 +00:00
2020-08-17 14:11:07 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-20 14:29:38 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-14 10:02:09 +00:00
2020-09-24 13:55:22 +00:00
2020-08-07 08:30:41 +00:00
2020-10-06 09:52:17 +00:00
2020-09-18 17:34:46 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 07:00:48 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-09-08 05:59:49 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-21 09:38:26 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-10-08 15:46:28 +00:00
2020-08-07 08:30:41 +00:00
2020-09-29 13:46:59 +00:00
2020-08-07 08:30:41 +00:00
2020-10-13 08:09:15 +00:00
2020-08-07 08:30:41 +00:00
2020-08-22 12:55:12 +00:00
2020-08-19 14:32:13 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-13 18:42:42 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-09-08 18:12:26 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-10 09:11:10 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-08-07 08:30:41 +00:00
2020-09-01 11:18:00 +00:00
2020-09-29 17:52:02 +00:00
2020-10-12 11:04:07 +00:00
2020-09-02 08:46:22 +00:00
2020-08-20 13:34:16 +00:00
2020-09-30 09:19:16 +00:00
2020-09-29 17:52:02 +00:00
2020-10-08 13:12:59 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-09-24 10:29:44 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-09-29 17:52:02 +00:00
2020-09-14 10:01:49 +00:00
2020-09-01 11:18:00 +00:00
2020-10-13 07:31:58 +00:00
2020-10-09 12:05:27 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-09-15 11:36:12 +00:00
2020-09-09 10:29:26 +00:00
2020-10-07 11:17:38 +00:00
2020-09-01 11:18:00 +00:00
2020-09-29 17:52:02 +00:00
2020-09-14 08:27:44 +00:00
2020-09-01 11:18:00 +00:00
2020-09-22 14:16:37 +00:00
2020-10-05 09:36:34 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-09-15 01:37:05 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-10-12 15:19:12 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-10-05 09:36:34 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-10-13 13:59:31 +00:00
2020-10-13 11:03:30 +00:00
2020-10-12 17:45:22 +00:00
2020-09-01 11:18:00 +00:00
2020-10-05 09:36:34 +00:00
2020-09-17 07:54:03 +00:00
2020-09-03 15:14:23 +00:00
2020-09-01 11:18:00 +00:00
2020-09-17 07:54:03 +00:00
2020-09-01 11:18:00 +00:00
2020-10-12 07:55:15 +00:00
2020-09-29 04:25:44 +00:00
2020-09-01 11:18:00 +00:00
2020-09-29 17:52:02 +00:00
2020-09-11 13:20:05 +00:00
2020-10-05 14:58:36 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-08-12 09:57:09 +00:00
2020-09-29 17:52:02 +00:00
2020-10-12 11:00:37 +00:00
2020-09-01 11:18:00 +00:00
2020-10-12 10:16:04 +00:00
2020-09-01 11:18:00 +00:00
2020-09-09 09:21:12 +00:00
2020-10-05 09:36:34 +00:00
2020-09-01 11:18:00 +00:00
2020-10-07 13:49:32 +00:00
2020-09-28 10:12:22 +00:00
2020-09-29 17:52:02 +00:00
2020-09-29 17:52:02 +00:00
2020-10-12 17:01:02 +00:00
2020-10-09 12:40:21 +00:00
2020-09-01 11:18:00 +00:00
2020-09-24 15:51:19 +00:00
2020-10-06 11:10:54 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-09-15 08:11:44 +00:00
2020-10-12 17:40:07 +00:00
2020-09-28 12:45:08 +00:00
2020-10-06 11:21:38 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-10-09 07:35:59 +00:00
2020-10-12 09:29:09 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-10-06 17:38:00 +00:00
2020-09-29 17:52:02 +00:00
2020-09-18 09:42:09 +00:00
2020-10-05 09:36:34 +00:00
2020-09-01 11:18:00 +00:00
2020-10-12 07:43:43 +00:00
2020-10-05 09:36:34 +00:00
2020-10-09 11:58:53 +00:00
2020-10-09 11:56:03 +00:00
2020-09-30 17:15:03 +00:00
2020-10-12 15:18:48 +00:00
2020-10-05 09:36:34 +00:00
2020-08-24 10:20:12 +00:00
2020-10-05 09:36:34 +00:00
2020-10-05 09:36:34 +00:00
2020-10-05 09:36:34 +00:00
2020-10-05 09:36:34 +00:00
2020-08-14 21:20:47 +00:00
2020-09-01 11:18:00 +00:00
2020-10-05 09:36:34 +00:00
2020-09-29 17:52:02 +00:00
2020-10-13 16:16:45 +00:00
2020-10-12 15:19:39 +00:00
2020-10-01 17:53:37 +00:00
2020-09-29 17:52:02 +00:00
2020-10-13 14:59:08 +00:00
2020-09-29 17:52:02 +00:00
2020-09-02 09:32:14 +00:00
2020-10-09 08:21:23 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-10-07 09:04:47 +00:00
2020-10-05 09:36:34 +00:00
2020-08-21 17:30:13 +00:00
2020-09-29 17:52:02 +00:00
2020-10-06 08:51:09 +00:00
2020-10-08 13:12:59 +00:00
2020-10-05 09:36:34 +00:00
2020-10-02 07:26:27 +00:00
2020-08-04 14:28:29 +00:00
2020-09-29 17:52:02 +00:00
2020-10-07 12:10:31 +00:00
2020-09-29 08:48:59 +00:00
2020-10-02 08:52:39 +00:00
2020-09-01 12:10:30 +00:00
2020-10-07 10:21:51 +00:00
2020-09-21 10:09:12 +00:00
2020-09-29 17:39:13 +00:00
2020-09-01 11:18:00 +00:00
2020-09-15 07:12:02 +00:00
2020-10-05 17:00:59 +00:00
2020-09-01 11:18:00 +00:00
2020-09-08 18:12:26 +00:00
2020-09-01 11:18:00 +00:00
2020-09-21 08:06:05 +00:00
2020-10-12 17:46:09 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-09-01 11:18:00 +00:00
2020-09-29 17:52:02 +00:00
2020-09-01 11:18:00 +00:00
2020-09-29 17:52:02 +00:00
2020-10-02 15:35:21 +00:00
2020-09-01 11:18:00 +00:00
2020-10-13 16:57:41 +00:00
2020-09-29 17:52:02 +00:00
2020-10-08 16:14:14 +00:00
2020-10-05 09:36:34 +00:00
2020-09-01 11:18:00 +00:00