log watcher is done
CI / changes (push) Successful in 5s
CI / docker-bff (push) Failing after 4s
CI / docker-product (push) Failing after 1s
CI / docker-admin (push) Failing after 1s
CI / docker-user (push) Failing after 1s

This commit is contained in:
2026-08-21 10:06:06 +08:00
parent f49d155373
commit dd67efe0d5
12 changed files with 259 additions and 23 deletions
+9
View File
@@ -203,3 +203,12 @@ func TimeToUnix(timeStr string, layout string) (int64, error) {
// 转 11 位时间戳(秒)
return t.Unix(), nil
}
func ParseCustomTime(s string) (CustomTime, error) {
ct := CustomTime{}
// UnmarshalJSON 需要带双引号的json字符串,所以包装成json字符串格式
err := ct.UnmarshalJSON([]byte(`"` + s + `"`))
if err != nil {
return CustomTime{}, err
}
return ct, nil
}