Try to fix an update error

The update is faster then 1 second so it get executed multiple times, this should prevent it
This commit is contained in:
2022-12-25 13:15:34 +01:00
parent 51c27d2e22
commit 5fabde9a00

View File

@@ -52,7 +52,7 @@ void app_main(void *argument)
{
Get_Time(&sDate, &sTime);
DS3231_GetTime(&utc);
if ((utc.Hour == 0) && (utc.Minute == 0) && (utc.Second == 0))
if ((utc.Hour == 0) && (utc.Minute == 0) && (utc.Second == 0) && sBefore == 59)
{
debugln("Updating time");
breakTime(NTPToEpochUnix(), &utc, 0);