Skip to content

Commit

Permalink
Merge pull request #15 from berstpander/bugfix/timestamp
Browse files Browse the repository at this point in the history
Bugfix/timestamp
  • Loading branch information
aaronchen2k authored Aug 31, 2021
2 parents 85143f2 + f5de458 commit 0f73e34
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion demo/28_datetime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fields:
postfix: "\t"

- field: time2 # 生成时间数据,指定起止时间的方式,从早上9点到今天结束,间隔1分钟(60秒)。
range: "20210101 000000-20210101 240000:60" # 起始、结束时间用-分隔,默认为当天的开始和结束时间。
range: "20210101 000000-20210101 230000:60" # 起始、结束时间用-分隔,默认为当天的开始和结束时间。
type: timestamp
format: "YY/MM/DD hh:mm:ss"
postfix: "\t"
Expand Down
3 changes: 0 additions & 3 deletions src/gen/timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,6 @@ func parseTsValue(str string, isStart bool) (value int64) {
value = todayEnd
}
} else {
if !isStart {
tm = time.Date(tm.Year(), tm.Month(), tm.Day(), 23, 59, 59, 0, tm.Location())
}
value = tm.Unix()
}

Expand Down

0 comments on commit 0f73e34

Please sign in to comment.