Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/timestamp #15

Merged
merged 2 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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