diff --git a/packages/core/cli/bin/index.js b/packages/core/cli/bin/index.js index 032e1c0c5..94b39fd6a 100755 --- a/packages/core/cli/bin/index.js +++ b/packages/core/cli/bin/index.js @@ -11,6 +11,7 @@ const env = { API_BASE_PATH: '/api/', DB_DIALECT: 'sqlite', DB_STORAGE: 'storage/db/nocobase.sqlite', + DB_TIMEZONE: '+00:00', DEFAULT_STORAGE_TYPE: 'local', LOCAL_STORAGE_DEST: 'storage/uploads', }; diff --git a/packages/core/database/src/database.ts b/packages/core/database/src/database.ts index 233c2e8df..dec73f699 100644 --- a/packages/core/database/src/database.ts +++ b/packages/core/database/src/database.ts @@ -94,6 +94,8 @@ export class Database extends EventEmitter implements AsyncEmitter { if (options.dialect === 'sqlite') { delete opts.timezone; + } else if (!opts.timezone) { + opts.timezone = '+00:00'; } this.sequelize = new Sequelize(opts);