Commit f27375ff authored by 谢宇轩's avatar 谢宇轩 😅

修改获取不到系统时区的bug

parent 628e38e9
......@@ -28,7 +28,10 @@ func FormatServiceWfLog(sourceKey string, message string) (Matedata, error) {
mateItem.Level = message[:levelIndex]
message = message[levelIndex:]
loc, _ := time.LoadLocation(Location)
loc, err := time.LoadLocation(Location)
if err != nil {
loc = time.FixedZone("CST", 8*3600)
}
logTime, _ := time.ParseInLocation(": 06-01-02 15:04:05 ", message[:strings.Index(message, "[")], loc)
mateItem.create = logTime
keyword := serviceWfLogKeyWord
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment