I have been working with the RTC code here:
The sample code line:
DateTime alarm = DateTime(now.year(), now.month(), now.day(), now.hour(), now.minute(), now.second() + 15);
may fail if now.second() + 15 results in a seconds time of 60.
In exploring this I discovered that there is also an error in the DateTime library for the function time2ulong which results in a calculated time being 8 hours early. I suspect this has been an attempt to compensate for a TimeZone. With the correction below, restoring the original code, calculations of times such as DateTime alarm = DateTime ( now + 1); are correct.
static uint32_t time2ulong(uint16_t days, uint8_t h, uint8_t m, uint8_t s) {
//return ((days * 24UL + h - 8) * 60 + m) * 60 + s; // this is a fudge possibly to deal with a timezone ??
return ((days * 24UL + h ) * 60 + m) * 60 + s; // removed the -8
}
Perhaps you can up date the library sources and check the sample code?
Cheers
Ted