Hi Everyone,
I'm a new Teensy 3.6 user. I'm using Arduino 1.8.0 and Teensyduino 1.35.
Here is the source code:
The output:
Shouldn't it be?:
I tried dayStr( weekday(timeNow) ). It does the same. It also displays 'Jan' instead of 'Monday'.
Am I using this function incorrectly?
Not a big deal. Just reporting what appears to be a bug. I don't actually need the function. I was just doing some testing and noticed.
BTW - I was pleasantly disappointed that the RTC is auto-magically programmed and the time is set. I was preparing to write a driver. Super kudos!
I'm a new Teensy 3.6 user. I'm using Arduino 1.8.0 and Teensyduino 1.35.
Here is the source code:
Code:
#include <TimeLib.h>
void setup()
{
Serial.begin(250000);
setTime(RTC_TSR);
}
void loop()
{
time_t timeNow = now();
Serial.printf("\n%s, %02u%s%u %02u:%02u:%02u",
dayShortStr( weekday(timeNow) ),
day(timeNow), monthShortStr(month(timeNow)),
year(timeNow), hour(timeNow), minute(timeNow),
second(timeNow)
);
}
The output:
Code:
Jan, 23Jan2017 16:30:57
Shouldn't it be?:
Code:
Mon, 23Jan2017 16:30:57
I tried dayStr( weekday(timeNow) ). It does the same. It also displays 'Jan' instead of 'Monday'.
Am I using this function incorrectly?
Not a big deal. Just reporting what appears to be a bug. I don't actually need the function. I was just doing some testing and noticed.
BTW - I was pleasantly disappointed that the RTC is auto-magically programmed and the time is set. I was preparing to write a driver. Super kudos!