Index: sources/ApplicationPost.cpp =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -re1c454bcf26e1f4dd9aaffe05daeca138eb743b3 --- sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision e1c454bcf26e1f4dd9aaffe05daeca138eb743b3) @@ -49,6 +49,7 @@ _isCloudSync = checkCloudSync (); // is not mandatory and the device can still be used without it. Alarm will be triggered to notify user in Active Alarm List. _isEthernet = checkEthernet (); // this is not a Fault and not required the application to stop. No Alarm will be triggered. _isSound = checkSound (); // this is not a Fault and not required the application to stop. No Alarm will be triggered. + _isYearCheck = checkYear (); // WARNING: // all of the checks have to be done, // although some are not failing the final result, @@ -62,7 +63,8 @@ isRtc () && isWiFi () && isBluetooth () && - isCloudSync () + isCloudSync () && + isYearCheck () ; } else { @@ -221,3 +223,17 @@ emit didSound(ok); return ok; } + +/*! + * \brief ApplicationPost::checkYear + * \details Checks if the year is greater than or equal to 2022. + * \return false if there is an issue. + */ +bool ApplicationPost::checkYear() +{ + QDate currentDate = QDate::currentDate(); + bool ok = currentDate.year() >= _yearMinimum; + if (! ok) emit didFail(Gui::GuiAlarmID::ALARM_ID_HD_UI_POST_FAILURE_INVALID_YEAR); + emit didYearCheck(ok); + return ok; +}