Arm Mbed OS support forum

Epoch time calculation for ds3213 rtc

Hi,

I am using the ds 3213 rtc in my project and need to calculate as per below information:

ds3231_time_t time = {0, 48, 13, 1, 0}; // second, min, hours, am_pm, mode
ds3231_calendar_t calendar = {01, 07, 06, 21}; // day date month year

but the output is getting is: epoch time = 29156.

I don’t know what is going wrong.

Please help to configure ds 3213 rtc to get the correct epoch.

With regards,
Rahul Kidehca