diff --git a/packages/nc-gui/utils/dateTimeUtils.ts b/packages/nc-gui/utils/dateTimeUtils.ts index 803936ebdb..0ab64555ef 100644 --- a/packages/nc-gui/utils/dateTimeUtils.ts +++ b/packages/nc-gui/utils/dateTimeUtils.ts @@ -1,7 +1,11 @@ import dayjs from 'dayjs' +// show in local time export const timeAgo = (date: any) => { - return dayjs.utc(date).fromNow() + if (date.slice(-1) === 'Z') { + return dayjs(date).fromNow() + } + return dayjs(date).utc(true).local().fromNow() } export const dateFormats = [