Revert "Revert "refactor: timezone""

This commit is contained in:
աɨռɢӄաօռɢ
2023-05-20 18:24:38 +08:00
committed by GitHub
parent 4fde2708fa
commit 56a6466db3
34 changed files with 11418 additions and 5332 deletions

View File

@@ -7,6 +7,7 @@ import { parseProp } from '#imports'
export default function convertCellData(
args: { from: UITypes; to: UITypes; value: any; column: ColumnType; appInfo: AppInfo },
isMysql = false,
isXcdbBase = false,
) {
const { from, to, value } = args
if (from === to && ![UITypes.Attachment, UITypes.Date, UITypes.DateTime, UITypes.Time, UITypes.Year].includes(to)) {
@@ -42,7 +43,7 @@ export default function convertCellData(
if (!parsedDateTime.isValid()) {
throw new Error('Not a valid datetime value')
}
return parsedDateTime.format(dateFormat)
return parsedDateTime.format('YYYY-MM-DD HH:mm:ssZ')
}
case UITypes.Time: {
let parsedTime = dayjs(value)