Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1
zouap 4 years ago
parent
commit
822847955d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      models/user_business_analysis.go

+ 2
- 2
models/user_business_analysis.go View File

@@ -68,12 +68,12 @@ func countData() {
sess.Find(&userList)

currentTimeNow := time.Now()
log.Info("current time:" + currentTimeNow.Format("2000-01-01 10:10:10"))
log.Info("current time:" + currentTimeNow.Format("2006-01-02 15:04:05"))

yesterday := currentTimeNow.AddDate(0, 0, -1)
startTime := time.Date(yesterday.Year(), yesterday.Month(), yesterday.Day(), 0, 0, 0, 0, yesterday.Location())
start_unix := startTime.Unix()
log.Info("DB query time:" + startTime.Format("2000-01-01 10:10:10"))
log.Info("DB query time:" + startTime.Format("2006-01-02 15:04:05"))

endTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 0, 0, 0, currentTimeNow.Location())
end_unix := endTime.Unix()


Loading…
Cancel
Save