All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 4m56s
1. ppanel.go: LoadLocation 失败时用 FixedZone("CST", +8h) 兜底
2. Dockerfile: 复制完整 /usr/share/zoneinfo 目录,确保 go-sql-driver 也能加载 Asia/Shanghai
Co-Authored-By: claude-flow <ruv@ruv.net>
23 lines
435 B
Go
23 lines
435 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/perfect-panel/server/cmd"
|
|
)
|
|
|
|
func init() {
|
|
// Ensure time.Local matches DSN loc=Asia/Shanghai.
|
|
// In scratch Docker images, LoadLocation may fail due to missing zoneinfo,
|
|
// so fall back to FixedZone as a guaranteed alternative.
|
|
loc, err := time.LoadLocation("Asia/Shanghai")
|
|
if err != nil {
|
|
loc = time.FixedZone("CST", 8*3600)
|
|
}
|
|
time.Local = loc
|
|
}
|
|
|
|
func main() {
|
|
cmd.Execute()
|
|
}
|