API: Don't be so strict with the downtime start_time

There may be a slight overlap between the actual request
time and 'now'.

refs #7271
This commit is contained in:
Michael Friedrich 2019-07-02 15:12:47 +02:00
parent f63d9cce4a
commit 3b7cf5b9b5
1 changed files with 1 additions and 1 deletions

View File

@ -337,7 +337,7 @@ Dictionary::Ptr ApiActions::ScheduleDowntime(const ConfigObject::Ptr& object,
String comment = HttpUtility::GetLastParameter(params, "comment");
double startTime = HttpUtility::GetLastParameter(params, "start_time");
double endTime = HttpUtility::GetLastParameter(params, "end_time");
double now = Utility::GetTime();
double now = Utility::GetTime() - 10; //Take a request delay into account.
if (author.IsEmpty() || comment.IsEmpty())
return ApiActions::CreateResult(400, "Options 'author' and 'comment' must not be empty");