Ver código fonte

时间格式化

WH01243 1 ano atrás
pai
commit
756508ba2e
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      clueSync/autoTask.go

+ 3 - 3
clueSync/autoTask.go

@@ -415,7 +415,7 @@ func Thaw() {
 			freezeInt64 := int64(0)
 			freezeStr := gconv.String(v["FREEZE_TIME"])
 			if freezeStr != "" {
-				t, _ := time.Parse(layout, freezeStr)
+				t, _ := time.ParseInLocation(layout, freezeStr, time.Local)
 				freezeInt64 = t.Unix()
 			}
 			if freezeInt64 < nowTime.Unix() {
@@ -432,7 +432,7 @@ func Thaw() {
 						"change_type":  "所属人变更",
 						"old_value":    nameMap[positionId],
 						"new_value":    "/",
-						"createtime":   nowTime,
+						"createtime":   time.Now().Format(date.Date_Full_Layout),
 						"BCPCID":       common.GetRandom(32),
 						"operator_id":  -1,
 					})
@@ -443,7 +443,7 @@ func Thaw() {
 					"change_field": "position_id",
 					"change_type":  "线索解冻",
 					"new_value":    "自动退回公海",
-					"createtime":   nowTime,
+					"createtime":   time.Now().Format(date.Date_Full_Layout),
 					"BCPCID":       common.GetRandom(32),
 					"operator_id":  -1,
 				})