Im trying to compare if a runtime variable is within now and one minute from now. Here is the code:
if (RunTime.ToUniversalTime() >= now.ToUniversalTime() &&
RunTime.ToUniversalTime() < now.AddMinutes(1).ToUniversalTime())
{
//Do Stuff
}
However this evaluates to true a minute before I would expect. for instance if I have my runtime as 9:30 it evaluates to true from 9:29 to 9:30 not 9:30 - 9:31. What Am I missing here? The way I understand the code is that it would evaluate to true when runtime is greater than or equal to now and less than now plus one minute.