diff --git a/migrations/1655807727853-default_timezone_fix.js b/migrations/1655807727853-default_timezone_fix.js new file mode 100644 index 00000000..fba11a26 --- /dev/null +++ b/migrations/1655807727853-default_timezone_fix.js @@ -0,0 +1,20 @@ +const { saveConfig, loadLatest } = require('../lib/new-settings-loader') + +exports.up = function (next) { + const newConfig = {} + return loadLatest() + .then(config => { + if (config.config.locale_timezone === "0:0") { + newConfig[`locale_timezone`] = 'GMT' + return saveConfig(newConfig) + } + }) + .then(next) + .catch(err => { + return next(err) + }) +} + +module.exports.down = function (next) { + next() +}