Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions desk/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ export function validateEmailWithZod(email: string) {

export function dateFormat(date, format?: string) {
const _format = format || "DD-MM-YYYY HH:mm:ss";
return useDateFormat(date, _format).value;
const _date = date ? dayjs.tz(date).toDate() : date;
return useDateFormat(_date, _format).value;
}

export function timeAgo(date) {
return useTimeAgo(date).value;
return useTimeAgo(dayjs.tz(date).toDate()).value;
}

export const dateTooltipFormat = "ddd, MMM D, YYYY h:mm A";
Expand Down
Loading