fix: normalize timezone history filters

This commit is contained in:
lingniu
2026-07-02 01:24:51 +08:00
parent a7b24f4c0b
commit 78b805e3a2
2 changed files with 14 additions and 0 deletions

View File

@@ -810,6 +810,9 @@ func normalizeDateTimeLiteral(value string) string {
if len(value) == len("2006-01-02T15:04:05") && value[10] == 'T' {
return value[:10] + " " + value[11:]
}
if parsed, err := time.Parse(time.RFC3339, value); err == nil {
return parsed.In(time.FixedZone("Asia/Shanghai", 8*3600)).Format("2006-01-02 15:04:05")
}
return value
}