[FIX] mail: "Invalid Date" errors on iOS Safari
Before this commit:
JS errors on iOS with Safari's browser due to the date syntax not being
supported:
```js
new Date("2023-08-18 14:02:53")
-> Invalid Date
```
This does prevent Odoo's backend to start up on the browser and the app
on iOS devices.
opw-3465337
closes odoo/odoo#132461
X-original-commit: a39391d0df644fce86f435ba3f39e7634d8e5172
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
committed by
Alexandre Kühn
parent
698e14a003
commit
e403eec89b
@@ -3,6 +3,7 @@
|
||||
import { ScrollPosition } from "@mail/core/common/scroll_position_model";
|
||||
import { createLocalId } from "@mail/utils/common/misc";
|
||||
|
||||
import { deserializeDateTime } from "@web/core/l10n/dates";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Deferred } from "@web/core/utils/concurrency";
|
||||
|
||||
@@ -430,7 +431,7 @@ export class Thread {
|
||||
if (!this.last_interest_dt) {
|
||||
return undefined;
|
||||
}
|
||||
return luxon.DateTime.fromISO(new Date(this.last_interest_dt).toISOString());
|
||||
return deserializeDateTime(this.last_interest_dt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user