fix: issue with 1645459054117-default-timezone
This commit is contained in:
parent
2d5cbe771a
commit
d6305e456f
1 changed files with 20 additions and 0 deletions
20
migrations/1655807727853-default_timezone_fix.js
Normal file
20
migrations/1655807727853-default_timezone_fix.js
Normal 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()
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue