simplified applier read of timezone
This commit is contained in:
parent
dcd2f36c88
commit
f9c15127cd
@ -86,12 +86,11 @@ func (this *Applier) validateConnection(db *gosql.DB) error {
|
|||||||
|
|
||||||
// validateAndReadTimeZone potentially reads server time-zone
|
// validateAndReadTimeZone potentially reads server time-zone
|
||||||
func (this *Applier) validateAndReadTimeZone() error {
|
func (this *Applier) validateAndReadTimeZone() error {
|
||||||
if this.migrationContext.ApplierTimeZone == "" {
|
|
||||||
query := `select @@global.time_zone`
|
query := `select @@global.time_zone`
|
||||||
if err := this.db.QueryRow(query).Scan(&this.migrationContext.ApplierTimeZone); err != nil {
|
if err := this.db.QueryRow(query).Scan(&this.migrationContext.ApplierTimeZone); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
|
||||||
log.Infof("will use time_zone='%s' on applier", this.migrationContext.ApplierTimeZone)
|
log.Infof("will use time_zone='%s' on applier", this.migrationContext.ApplierTimeZone)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user