lamassu-server/packages/server/migrations/1655807727853-default_timezone_fix.js
2025-12-31 19:04:13 +01:00

19 lines
404 B
JavaScript

const { loadConfig, saveConfig } = require('./settings')
exports.up = function (next) {
return loadConfig()
.then(config => {
if (config.locale_timezone === '0:0') {
const newConfig = { locale_timezone: 'GMT' }
return saveConfig(newConfig)
}
})
.then(next)
.catch(err => {
return next(err)
})
}
module.exports.down = function (next) {
next()
}