diff --git a/src/utility/time/TimeService.cpp b/src/utility/time/TimeService.cpp index 5bf081de7..e6d3cd4d3 100644 --- a/src/utility/time/TimeService.cpp +++ b/src/utility/time/TimeService.cpp @@ -320,7 +320,10 @@ unsigned long TimeServiceClass::getRemoteTime() bool TimeServiceClass::isTimeValid(unsigned long const time) { - return (time > EPOCH_AT_COMPILE_TIME); + /* EPOCH_AT_COMPILE_TIME is in local time, so we need to subtract the maximum + * possible timezone offset UTC+14 to make sure we are less then UTC time + */ + return (time > (EPOCH_AT_COMPILE_TIME - (14 * 60 * 60))); } bool TimeServiceClass::isTimeZoneOffsetValid(long const offset)