We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9166399 commit d1fc512Copy full SHA for d1fc512
src/utility/time/TimeService.cpp
@@ -320,7 +320,9 @@ unsigned long TimeServiceClass::getRemoteTime()
320
321
bool TimeServiceClass::isTimeValid(unsigned long const time)
322
{
323
- return (time > EPOCH_AT_COMPILE_TIME);
+ // EPOCH_AT_COMPILE_TIME is in local time,
324
+ // so we need to subtract the maximum possible timezone offset to make sure we are less then utc time
325
+ return (time > (EPOCH_AT_COMPILE_TIME - (/*UTC+14*/ 14 * 60 * 60)));
326
}
327
328
bool TimeServiceClass::isTimeZoneOffsetValid(long const offset)
0 commit comments