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