zhangxinlei1996 vor 1 Jahr
Ursprung
Commit
00b8acf29a
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      api/timetask/timetask.go

+ 2 - 2
api/timetask/timetask.go

@@ -25,13 +25,13 @@ func getTime() (string, string) {
 	today := time.Now()
 
 	// 计算两天前的时间
-	twoDaysAgo := today.AddDate(0, 0, -cm.Push.DueDay)
+	twoDaysAgo := today.AddDate(0, 0, cm.Push.DueDay)
 
 	// 设置时间为 0 点
 	startTime := time.Date(twoDaysAgo.Year(), twoDaysAgo.Month(), twoDaysAgo.Day(), 0, 0, 0, 0, twoDaysAgo.Location())
 
 	// 设置时间为 24 点
-	endTime := startTime.Add(time.Duration(cm.Push.DueDay) * 24 * time.Hour)
+	endTime := startTime.Add(time.Duration(1) * 24 * time.Hour)
 	return startTime.Format(date.Date_Full_Layout), endTime.Format(date.Date_Full_Layout)
 }