Browse Source

feat(nocodb): set timezone for non mysql

pull/5601/head
Wing-Kam Wong 2 years ago
parent
commit
00b598da1a
  1. 5
      packages/nocodb-nest/src/meta/meta.service.ts

5
packages/nocodb-nest/src/meta/meta.service.ts

@ -1065,9 +1065,12 @@ export class MetaService {
migrationSource: new XcMigrationSourcev2(),
tableName: 'xc_knex_migrationsv2',
});
// set timezone
if (this.isMySQL()) {
// set timezone
await this.connection.raw(`SET time_zone = '+00:00'`);
} else {
await this.connection.raw(`SET timezone='UTC'`);
}
return true;
}

Loading…
Cancel
Save