소스 검색

fix cron_next_timeout (#307)

SeeWhy 3 년 전
부모
커밋
cac4e7a8ba
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      base/htime.c

+ 1 - 1
base/htime.c

@@ -254,7 +254,7 @@ time_t cron_next_timeout(int minute, int hour, int day, int week, int month) {
 
     tt_round = mktime(&tm);
     if (week >= 0) {
-        tt_round = tt + (week-tm.tm_wday)*SECONDS_PER_DAY;
+        tt_round += (week-tm.tm_wday)*SECONDS_PER_DAY;
     }
     if (tt_round > tt) {
         return tt_round;