add
This commit is contained in:
@@ -72,7 +72,14 @@ func SetupTimezone(tz string) error {
|
||||
}
|
||||
loc, err := time.LoadLocation(tz)
|
||||
if err != nil {
|
||||
return err
|
||||
// fallback for alpine without tzdata
|
||||
switch tz {
|
||||
case "Asia/Shanghai", "PRC", "CST":
|
||||
time.Local = time.FixedZone("CST", 8*3600)
|
||||
return nil
|
||||
default:
|
||||
return err
|
||||
}
|
||||
}
|
||||
time.Local = loc
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user