fix: default value of time zone

This commit is contained in:
chenos 2022-06-01 12:25:21 +08:00
parent 0270553601
commit 1a5d1f1ebf
2 changed files with 3 additions and 0 deletions

View File

@ -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',
};

View File

@ -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);