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

重新规划时区的配置,去掉无用输出

parent 9a310ea9
...@@ -26,7 +26,6 @@ func FormatServiceWfLog(sourceKey string, message string) (Matedata, error) { ...@@ -26,7 +26,6 @@ func FormatServiceWfLog(sourceKey string, message string) (Matedata, error) {
// 给时间调回UTC+8 // 给时间调回UTC+8
logTime, _ := time.ParseInLocation(": 06-01-02 15:04:05 ", message[:strings.Index(message, "[")], time.FixedZone("UTC", 8*3600)) logTime, _ := time.ParseInLocation(": 06-01-02 15:04:05 ", message[:strings.Index(message, "[")], time.FixedZone("UTC", 8*3600))
mateItem.create = logTime mateItem.create = logTime
keyword := serviceWfLogKeyWord keyword := serviceWfLogKeyWord
for _, word := range keyword { for _, word := range keyword {
...@@ -47,7 +46,6 @@ func FormatServiceWfLog(sourceKey string, message string) (Matedata, error) { ...@@ -47,7 +46,6 @@ func FormatServiceWfLog(sourceKey string, message string) (Matedata, error) {
} }
// 那这里获取UTC时间为8小时前 // 那这里获取UTC时间为8小时前
mateItem.Data["timestamp"] = mateItem.create.UTC().Format("2006-01-02 15:04:05") mateItem.Data["timestamp"] = mateItem.create.UTC().Format("2006-01-02 15:04:05")
result := *mateItem result := *mateItem
mateItem.reset() mateItem.reset()
MatePool.Put(mateItem) MatePool.Put(mateItem)
......
...@@ -21,7 +21,6 @@ func (dump *Dump) HandleFunc(m *entity.Matedata) error { ...@@ -21,7 +21,6 @@ func (dump *Dump) HandleFunc(m *entity.Matedata) error {
if err != nil { if err != nil {
continue continue
} }
log.Println("DP",createdAt)
// UTC时间就是+8小时 // UTC时间就是+8小时
v = createdAt.UTC().Format("2006-01-02 15:04:05") v = createdAt.UTC().Format("2006-01-02 15:04:05")
} }
......
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