Browse Source

fix(nocodb): add missing +00:00

pull/5659/head
Wing-Kam Wong 1 year ago
parent
commit
1e4e2e9278
  1. 5
      packages/nocodb/src/models/Model.ts

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

@ -469,6 +469,11 @@ export default class Model implements TableType {
}
if (col.uidt === UITypes.DateTime && dayjs(val).isValid()) {
const { isMySQL, isSqlite, isMssql, isPg } = clientMeta;
if (val.indexOf('+') < 0 && val.slice(-1) !== 'Z') {
// if no timezone is given,
// then append +00:00 to make it as UTC
val += '+00:00';
}
if (isMySQL) {
// first convert the value to utc
// from UI

Loading…
Cancel
Save