platform/plugins/calendar-resources/src/utils.ts
Alexander Platov ecce199b4e
Calendar: fixed the display of the past days (events) (#3527)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
2023-07-28 09:46:26 +06:00

15 lines
342 B
TypeScript

import { Timestamp } from '@hcengineering/core'
export function saveUTC (date: Timestamp): Timestamp {
const utcdate = new Date(date)
return Date.UTC(
utcdate.getFullYear(),
utcdate.getMonth(),
utcdate.getDate(),
utcdate.getHours(),
utcdate.getMinutes(),
utcdate.getSeconds(),
utcdate.getMilliseconds()
)
}