Index: sources/ApplicationPost.cpp =================================================================== diff -u -r28845c70151c3fb6f1a8e92c82da0232b6ca854a -r67e258b3ee2020a07507009b7207c14dc2d03f2e --- sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 28845c70151c3fb6f1a8e92c82da0232b6ca854a) +++ sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 67e258b3ee2020a07507009b7207c14dc2d03f2e) @@ -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; +}