feat: deal attributes editing

This commit is contained in:
2025-10-27 10:05:29 +04:00
parent e39df47520
commit d4c0eac4a0
13 changed files with 794 additions and 31 deletions

View File

@ -1,5 +1,9 @@
import { formatInTimeZone } from "date-fns-tz";
export const naiveDateTimeStringToUtc = (datetime: string) => {
return `${datetime.replace(" ", "T")}Z`;
};
export const utcDateToLocal = (datetime: string | Date) => {
const userTZ = Intl.DateTimeFormat().resolvedOptions().timeZone;
const localTime = formatInTimeZone(datetime, userTZ, "yyyy-MM-dd HH:mm:ss");