diff --git a/routers/repo/cloudbrain_statistic.go b/routers/repo/cloudbrain_statistic.go index 2ec12cd41..e412eb2db 100644 --- a/routers/repo/cloudbrain_statistic.go +++ b/routers/repo/cloudbrain_statistic.go @@ -26,9 +26,8 @@ func CloudbrainDurationStatisticHour() { } else { statisticTime = currentTime } - deleteBeginTime := time.Unix(int64(recordDurationUpdateTime[0].DateTime), 0) - err = models.DeleteCloudbrainDurationStatistic(timeutil.TimeStamp(deleteBeginTime.Unix()), timeutil.TimeStamp(currentTime.Unix())) + err = models.DeleteCloudbrainDurationStatistic(timeutil.TimeStamp(statisticTime.Unix()), timeutil.TimeStamp(currentTime.Unix())) if err != nil { log.Error("DeleteCloudbrainDurationStatistic failed", err) }