Browse Source

fix(nocodb): remove incorrect logic

pull/5659/head
Wing-Kam Wong 2 years ago
parent
commit
a0fc2d406c
  1. 22
      packages/nocodb/src/db/BaseModelSqlv2.ts

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

@ -3314,28 +3314,6 @@ class BaseModelSqlv2 {
let keepLocalTime = true;
if (this.isMySQL) {
if (isXcdbBase) {
if (d[col.title].indexOf('+') === -1) {
// no timezone info - considered as UTC
// e.g. 2023-05-11 12:00:00+00:00 (in DB)
// d[col.title] = 2023-05-11 04:00:00
d[col.title] = dayjs(d[col.title]).format(
'YYYY-MM-DD HH:mm:ss',
);
if (d[col.title].slice(-1) !== 'Z') {
// e.g. 2023-05-11 04:00:00 -> 2023-05-11 04:00:00Z
d[col.title] += 'Z';
}
}
} else {
if (d[col.title].indexOf('+') > -1) {
// timezone info found -> skip
continue;
}
}
}
if (this.isPg && col.dt === 'timestamp with time zone') {
// postgres - timezone already attached to input
// e.g. 2023-05-11 16:16:51+08:00

Loading…
Cancel
Save