mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-30 06:02:00 +02:00
Tauri events for request model updates
This commit is contained in:
@@ -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