From f1bb45ee8171f7a28491d86dfa8dadc30f681372 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Wed, 6 Apr 2022 10:17:29 +0200 Subject: [PATCH] Change timezone on mysql connection --- src/server/tmdb.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/tmdb.js b/src/server/tmdb.js index 9b0056c..d7223f0 100644 --- a/src/server/tmdb.js +++ b/src/server/tmdb.js @@ -45,8 +45,16 @@ function handleDisconnect() { 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 function escapeString(str) {