Change timezone on mysql connection
This commit is contained in:
parent
a56ef5a0f1
commit
f1bb45ee81
|
@ -45,8 +45,16 @@ function handleDisconnect() {
|
||||||
throw err; // server variable configures this)
|
throw err; // server variable configures this)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
connection.on('connection', conn => {
|
||||||
|
conn.query("SET time_zone='+02:00';", error => {
|
||||||
|
if(error){
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
handleDisconnect(); //Start the auto-restarting connection
|
handleDisconnect(); //Start the auto-restarting connection
|
||||||
|
|
||||||
function escapeString(str) {
|
function escapeString(str) {
|
||||||
|
|
Loading…
Reference in New Issue