Index: sources/ApplicationPost.cpp =================================================================== diff -u -rb10cf6d3e2db78ab255835ba6a450861eae4068e -r6560ad50ac175b928d076c1e3d325c936db82adc --- sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision b10cf6d3e2db78ab255835ba6a450861eae4068e) +++ sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 6560ad50ac175b928d076c1e3d325c936db82adc) @@ -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 { @@ -224,12 +226,13 @@ /*! * \brief ApplicationPost::checkYear - * \details Checks the year is greater than or equal to 2022. + * \details Checks if the year is greater than or equal to 2022. * \return false if there is an issue. */ bool ApplicationPost::checkYear() { - bool ok = _content.contains(_postmsg_wifi + _postmsg_postfix_passed); + QDate currentDate = QDate::currentDate(); + bool ok = currentDate.year() >= _yearMinimum; if (! ok) emit didFail(Gui::GuiAlarmID::ALARM_ID_UI_POST_FAILURE_INVALID_YEAR); emit didYearCheck(ok); return ok;