File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88| DATABASE_USERNAME | The username which is used to authenticate against the database. | cern |
99| DATABASE_PASSWORD | The password which is used to authenticate against the database. | cern |
1010| DATABASE_NAME | The name of the database | bookkeeping |
11+ | DATABASE_TIMEZONE | The timezone of the database | Etc/GMT+0 |
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ let port = 3306;
1717let username = 'cern' ;
1818let password = 'cern' ;
1919let database = 'bookkeeping' ;
20+ let timezone = 'Etc/GMT+2' ;
2021
2122if ( process . env . DATABASE_HOST ) {
2223 host = process . env . DATABASE_HOST ;
@@ -38,6 +39,10 @@ if (process.env.DATABASE_NAME) {
3839 database = process . env . DATABASE_NAME ;
3940}
4041
42+ if ( process . env . DATABASE_TIMEZONE ) {
43+ timezone = process . env . DATABASE_TIMEZONE ;
44+ }
45+
4146if ( process . env . NODE_ENV === 'test' ) {
4247 database = `${ database } _test` ;
4348}
@@ -49,4 +54,5 @@ module.exports = {
4954 username,
5055 password,
5156 database,
57+ timezone,
5258} ;
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class SequelizeDatabase extends IDatabase {
4141 dialectOptions : {
4242 charset : 'utf8mb4' ,
4343 collate : 'utf8mb4_unicode_ci' ,
44+ timezone : Config . timezone ,
4445 } ,
4546 logging : this . logger . debug . bind ( this . logger ) ,
4647 define : {
You can’t perform that action at this time.
0 commit comments