From 47260f405affe0b11339dac91e119dbb6d5836e9 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Wed, 2 Mar 2022 15:34:59 +0100 Subject: [PATCH] Updated DB client timezone to `Z` - whilst `UTC` was working, it's technically not supported as per the docs for `mysql`: https://www.npmjs.com/package/mysql#connection-options - `mysql2`, however, is a bit more strict and throws a warning for unsupported values, so it was flagging up when I was looking at switching to that library - this commit switches over to `Z` AKA Zulu - https://en.wikipedia.org/wiki/Coordinated_Universal_Time so both libraries are happy --- core/server/data/db/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/data/db/connection.js b/core/server/data/db/connection.js index 8d9a288b14..e15c02ad34 100644 --- a/core/server/data/db/connection.js +++ b/core/server/data/db/connection.js @@ -33,7 +33,7 @@ function configure(dbConfig) { } if (client === 'mysql') { - dbConfig.connection.timezone = 'UTC'; + dbConfig.connection.timezone = 'Z'; dbConfig.connection.charset = 'utf8mb4'; // NOTE: disabled so that worker processes can use the db without