fix: change DateTime.Now to IcdEnvironment.GetLocalTime()

This commit is contained in:
Jeffery Thompson
2018-07-13 11:45:22 -04:00
parent dfcdbba05f
commit 3185593977

View File

@@ -99,7 +99,7 @@ namespace ICD.Common.Utils.Services.Scheduler
try
{
actionsToRun = m_Actions
.Where(a => a.NextRunTime < DateTime.Now)
.Where(a => a.NextRunTime < IcdEnvironment.GetLocalTime())
.OrderBy(a => a.NextRunTime)
.ToArray();
}
@@ -137,7 +137,7 @@ namespace ICD.Common.Utils.Services.Scheduler
return;
}
long msToNextAction = (long)(action.NextRunTime.Value - DateTime.Now).TotalMilliseconds;
long msToNextAction = (long)(action.NextRunTime.Value - IcdEnvironment.GetLocalTime()).TotalMilliseconds;
m_Timer.Reset(msToNextAction);
}
finally