Browse Source

fix(nocodb): allow date type for parsing

pull/5642/head
Wing-Kam Wong 2 years ago
parent
commit
d03e689b92
  1. 4
      packages/nocodb/src/db/BaseModelSqlv2.ts

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

@ -3220,8 +3220,8 @@ class BaseModelSqlv2 {
try {
if (d) {
dateTimeColumns.forEach((col) => {
if (d[col.title] && typeof d[col.title] === 'string') {
// e.g. 01.01.2022 10:00:00+05:30 -> 2022-01-01 04:30:00+00:00 (TBC)
if (d[col.title]) {
// e.g. 01.01.2022 10:00:00+05:30 -> 2022-01-01 04:30:00+00:00
// e.g. 2023-05-09 11:41:49 -> 2023-05-09 11:41:49+00:00
d[col.title] = dayjs(d[col.title])
.utc(true)

Loading…
Cancel
Save