Skip to content

Commit b6548f1

Browse files
authored
Merge pull request #22 from bendebled/master
bug fix in setAlarmEpoch.
2 parents b603153 + c481302 commit b6548f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RTCZero.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ void RTCZero::setAlarmEpoch(uint32_t ts)
392392
time_t t = ts;
393393
struct tm* tmp = gmtime(&t);
394394

395-
setAlarmDate(tmp->tm_year - EPOCH_TIME_YEAR_OFF, tmp->tm_mon + 1, tmp->tm_mday);
395+
setAlarmDate(tmp->tm_mday, tmp->tm_mon + 1, tmp->tm_year - EPOCH_TIME_YEAR_OFF);
396396
setAlarmTime(tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
397397
}
398398
}

0 commit comments

Comments
 (0)