@@ -813,7 +813,7 @@ void STM32RTC::setAlarmDate(uint8_t day, uint8_t month, uint8_t year)
813
813
* @param subSeconds: optional pointer to where to store subseconds of the epoch in ms
814
814
* @retval epoch time in seconds
815
815
*/
816
- uint32_t STM32RTC::getEpoch (uint32_t *subSeconds)
816
+ time_t STM32RTC::getEpoch (uint32_t *subSeconds)
817
817
{
818
818
struct tm tm;
819
819
@@ -844,7 +844,7 @@ uint32_t STM32RTC::getEpoch(uint32_t *subSeconds)
844
844
* @brief get epoch time since 1st January 2000, 00:00:00
845
845
* @retval epoch time in seconds
846
846
*/
847
- uint32_t STM32RTC::getY2kEpoch (void )
847
+ time_t STM32RTC::getY2kEpoch (void )
848
848
{
849
849
return (getEpoch () - EPOCH_TIME_OFF);
850
850
}
@@ -855,7 +855,7 @@ uint32_t STM32RTC::getY2kEpoch(void)
855
855
* @param Alarm_Match match enum
856
856
* @param subSeconds subSeconds in ms
857
857
*/
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)
859
859
{
860
860
if (ts < EPOCH_TIME_OFF) {
861
861
ts = EPOCH_TIME_OFF;
@@ -877,7 +877,7 @@ void STM32RTC::setAlarmEpoch(uint32_t ts, Alarm_Match match, uint32_t subSeconds
877
877
* @param epoch time in seconds
878
878
* @param subSeconds subSeconds in ms
879
879
*/
880
- void STM32RTC::setEpoch (uint32_t ts, uint32_t subSeconds)
880
+ void STM32RTC::setEpoch (time_t ts, uint32_t subSeconds)
881
881
{
882
882
if (ts < EPOCH_TIME_OFF) {
883
883
ts = EPOCH_TIME_OFF;
@@ -908,7 +908,7 @@ void STM32RTC::setEpoch(uint32_t ts, uint32_t subSeconds)
908
908
* @brief set RTC time from epoch time since 1st January 2000, 00:00:00
909
909
* @param epoch time in seconds
910
910
*/
911
- void STM32RTC::setY2kEpoch (uint32_t ts)
911
+ void STM32RTC::setY2kEpoch (time_t ts)
912
912
{
913
913
setEpoch (ts + EPOCH_TIME_OFF);
914
914
}
0 commit comments