Browse Source

fix(nocodb): format date in API response

pull/6870/head
աɨռɢӄաօռɢ 1 year ago
parent
commit
ce71fd5caf
  1. 6
      packages/nocodb/src/db/BaseModelSqlv2.ts

6
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -8,7 +8,6 @@ import { nocoExecute } from 'nc-help';
import {
AuditOperationSubTypes,
AuditOperationTypes,
isDateMonthFormat,
isLinksOrLTAR,
isSystemColumn,
isVirtualCol,
@ -4512,11 +4511,12 @@ class BaseModelSqlv2 {
if (col.uidt === UITypes.Date) {
const dateFormat = col.meta?.date_format;
if (dateFormat && isDateMonthFormat(dateFormat)) {
if (dateFormat) {
d[col.title] = dayjs(d[col.title], dateFormat).format(dateFormat);
continue;
}
continue;
}
let keepLocalTime = true;
if (this.isSqlite) {

Loading…
Cancel
Save