try this instead:
Code:
#include "TimeLib.h"
const char days[8][10]={"Err", "Sunday", "Monday", "Tusday", "Wednesday", "Thursday", "Friday", "Saturday"};
const char months[12][10]={"January", "February", "March", "April", "May", "June", "July","August", "September", "October", "November", "December"};
int main()
{
while (!Serial); // Wait for Arduino Serial Monitor to open
delay(100);
tmElements_t rtc;
for (;;)
{
time_t rtc_raw = rtc_get();
breakTime( rtc_raw, rtc );
Serial.printf( "%s, %s ", days[rtc.Wday], months[rtc.Month] ); // correct
Serial.printf( "%02d, %04d", rtc.Day, (rtc.Year + 1970) );
Serial.printf( " @ %02d:%02d:%02d\r\n", rtc.Hour, rtc.Minute, rtc.Second );
delay(5000);
}
return 0;
}
//eob: main()
note: i removed the "F" macro - Teensy 3.x does not need it.
edit: ok, el_supremo is right.
maybe to save some bytes ram...AVR sucks. But why the stringcopy? What's the reason?