@@ -736,8 +736,15 @@ namespace HealthMonitor.Common | |||
return 1; // 23点到0点时,返回次日1小时 | |||
} | |||
// 处理 22 点特殊情况 | |||
if (currentHour == 22) | |||
{ | |||
return 0; // 22点到23点时,返回次日0小时 | |||
} | |||
// 计算其他时间的返回值 | |||
return (currentHour / 2 + 1) * 2; | |||
return (int)((Math.Round(currentHour / 2.0, 1) + 1) * 2); | |||
} | |||
///// <summary> | |||
@@ -257,7 +257,7 @@ namespace HealthMonitor.Service.Resolver | |||
); | |||
// 跨天 | |||
if (selectedScheduleHour == 1) | |||
if (selectedScheduleHour == 1 || selectedScheduleHour == 0) | |||
{ | |||
scheduledDateTime = scheduledDateTime.AddDays(1); | |||
} | |||