Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit c006ab7

Browse files
authored
Merge pull request #22 from lvan100/master
修改时间格式
2 parents 8d7b957 + 59dae6f commit c006ab7

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

replayer-agent/logic/worker/transformer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ func (t *Transformer) buildMockFiles(actions []esmodel.Action) map[string][][]by
163163

164164
object := make([]string, 0, 2)
165165
if toggleStatus == "1" {
166-
object = append(object, time.Now().AddDate(-1, 0, 0).Format("2006-01-02"))
167-
object = append(object, time.Now().AddDate(1, 0, 0).Format("2006-01-02"))
166+
object = append(object, time.Now().AddDate(-1, 0, 0).Format("2006-01-02 15:04"))
167+
object = append(object, time.Now().AddDate(1, 0, 0).Format("2006-01-02 15:04"))
168168
} else {
169-
object = append(object, time.Now().AddDate(1, 0, 0).Format("2006-01-02"))
170-
object = append(object, time.Now().Format("2006-01-02"))
169+
object = append(object, time.Now().AddDate(1, 0, 0).Format("2006-01-02 15:04"))
170+
object = append(object, time.Now().Format("2006-01-02 15:04"))
171171
}
172172
objects := make([][]string, 0, 1)
173173
objects = append(objects, object)
@@ -188,7 +188,7 @@ func (t *Transformer) buildMockFiles(actions []esmodel.Action) map[string][][]by
188188
Namespace: "gs_api",
189189
Name: toggleName,
190190
Version: 0,
191-
LastModifyTime: time.Now().Unix(),
191+
LastModifyTime: time.Now().Unix() * 1000,
192192
LogRate: 0,
193193
Rule: Rule{
194194
Subject: "date_time_period",

0 commit comments

Comments
 (0)