Merge pull request #1288 from ubavic/undefined_timezone_release

fix:  issue with 1645459054117-default-timezone
This commit is contained in:
Rafael Taranto 2022-07-21 10:26:52 +01:00 committed by GitHub
commit 86cfee3a12

View file

@ -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()
}