@@ -813,7 +813,7 @@ void STM32RTC::setAlarmDate(uint8_t day, uint8_t month, uint8_t year)
813813 * @param subSeconds: optional pointer to where to store subseconds of the epoch in ms
814814 * @retval epoch time in seconds
815815 */
816- uint32_t STM32RTC::getEpoch (uint32_t *subSeconds)
816+ time_t STM32RTC::getEpoch (uint32_t *subSeconds)
817817{
818818 struct tm tm;
819819
@@ -844,7 +844,7 @@ uint32_t STM32RTC::getEpoch(uint32_t *subSeconds)
844844 * @brief get epoch time since 1st January 2000, 00:00:00
845845 * @retval epoch time in seconds
846846 */
847- uint32_t STM32RTC::getY2kEpoch (void )
847+ time_t STM32RTC::getY2kEpoch (void )
848848{
849849 return (getEpoch () - EPOCH_TIME_OFF);
850850}
@@ -855,7 +855,7 @@ uint32_t STM32RTC::getY2kEpoch(void)
855855 * @param Alarm_Match match enum
856856 * @param subSeconds subSeconds in ms
857857 */
858- void STM32RTC::setAlarmEpoch (uint32_t ts, Alarm_Match match, uint32_t subSeconds)
858+ void STM32RTC::setAlarmEpoch (time_t ts, Alarm_Match match, uint32_t subSeconds)
859859{
860860 if (ts < EPOCH_TIME_OFF) {
861861 ts = EPOCH_TIME_OFF;
@@ -877,7 +877,7 @@ void STM32RTC::setAlarmEpoch(uint32_t ts, Alarm_Match match, uint32_t subSeconds
877877 * @param epoch time in seconds
878878 * @param subSeconds subSeconds in ms
879879 */
880- void STM32RTC::setEpoch (uint32_t ts, uint32_t subSeconds)
880+ void STM32RTC::setEpoch (time_t ts, uint32_t subSeconds)
881881{
882882 if (ts < EPOCH_TIME_OFF) {
883883 ts = EPOCH_TIME_OFF;
@@ -908,7 +908,7 @@ void STM32RTC::setEpoch(uint32_t ts, uint32_t subSeconds)
908908 * @brief set RTC time from epoch time since 1st January 2000, 00:00:00
909909 * @param epoch time in seconds
910910 */
911- void STM32RTC::setY2kEpoch (uint32_t ts)
911+ void STM32RTC::setY2kEpoch (time_t ts)
912912{
913913 setEpoch (ts + EPOCH_TIME_OFF);
914914}
0 commit comments