fix: default value of time zone
This commit is contained in:
parent
0270553601
commit
1a5d1f1ebf
@ -11,6 +11,7 @@ const env = {
|
|||||||
API_BASE_PATH: '/api/',
|
API_BASE_PATH: '/api/',
|
||||||
DB_DIALECT: 'sqlite',
|
DB_DIALECT: 'sqlite',
|
||||||
DB_STORAGE: 'storage/db/nocobase.sqlite',
|
DB_STORAGE: 'storage/db/nocobase.sqlite',
|
||||||
|
DB_TIMEZONE: '+00:00',
|
||||||
DEFAULT_STORAGE_TYPE: 'local',
|
DEFAULT_STORAGE_TYPE: 'local',
|
||||||
LOCAL_STORAGE_DEST: 'storage/uploads',
|
LOCAL_STORAGE_DEST: 'storage/uploads',
|
||||||
};
|
};
|
||||||
|
@ -94,6 +94,8 @@ export class Database extends EventEmitter implements AsyncEmitter {
|
|||||||
|
|
||||||
if (options.dialect === 'sqlite') {
|
if (options.dialect === 'sqlite') {
|
||||||
delete opts.timezone;
|
delete opts.timezone;
|
||||||
|
} else if (!opts.timezone) {
|
||||||
|
opts.timezone = '+00:00';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sequelize = new Sequelize(opts);
|
this.sequelize = new Sequelize(opts);
|
||||||
|
Loading…
Reference in New Issue
Block a user