mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-28 19:22:39 +01:00
Tauri events for request model updates
This commit is contained in:
1 parent
d0846dcd11
commit
8efd95fdbe
5 files changed
+59
-33
No files matched your search
@@ -45,6 +45,9 @@ export function convertDates<T extends BaseModel>(m: T): T {
|
||||
}
|
||||
|
||||
function convertDate(d: string | Date): Date {
|
||||
if (typeof d !== 'string') {
|
||||
return d;
|
||||
}
|
||||
const date = new Date(d);
|
||||
const userTimezoneOffset = date.getTimezoneOffset() * 60000;
|
||||
return new Date(date.getTime() - userTimezoneOffset);
|
||||
|
||||
Reference in new issue
Block a user