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(), migrationSource: new XcMigrationSourcev2(),
tableName: 'xc_knex_migrationsv2', tableName: 'xc_knex_migrationsv2',
}); });
if (this.isMySQL()) {
// set timezone // set timezone
if (this.isMySQL()) {
await this.connection.raw(`SET time_zone = '+00:00'`); await this.connection.raw(`SET time_zone = '+00:00'`);
} else {
await this.connection.raw(`SET timezone='UTC'`);
} }
return true; return true;
} }

Loading…
Cancel
Save