Browse Source

fix(nocodb): revise pg api logic

pull/5601/head
Wing-Kam Wong 2 years ago
parent
commit
d80f0888dc
  1. 7
      packages/nocodb/src/models/Model.ts

7
packages/nocodb/src/models/Model.ts

@ -482,14 +482,9 @@ export default class Model implements TableType {
.utcOffset(d.getTimezoneOffset(), keepLocalTime)
.format('YYYY-MM-DD HH:mm:ss');
} else if (isPg) {
let keepLocalTime = false;
if (val.slice(-1) === 'Z' || val.slice(-6) === '+00:00') {
// from UI
keepLocalTime = true;
}
val = dayjs
.utc(val)
.utcOffset(d.getTimezoneOffset(), keepLocalTime)
.utcOffset(d.getTimezoneOffset(), true)
.format('YYYY-MM-DD HH:mm:ssZ');
} else if (isMssql) {
if (val.slice(-1) === 'Z' || val.slice(-6) === '+00:00') {

Loading…
Cancel
Save