Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Leandro Rodrigues
#36710 Hi, Dear Mr!
It is from this post code( My 4 digit clock with a NTP time client )...
void printTime(const char s[],time_t t)
{
flag =false;
Serial.print(s);
printLeading0(hour(t));
Serial.print(":");
printLeading0(minute(t));
Serial.print(":");
printLeading0(second(t));
Serial.print(" ");
Serial.print(dayStr(weekday(t)));
Serial.print(" ");
Serial.print(day(t));
Serial.print(" ");
Serial.print(monthStr(month(t)));
Serial.print(" ");
Serial.println(year(t));
}

Thanks a Lot!
User avatar
By gmag11
#36724 In latest Arduino ESP8266 environment version there is a time.h file that interferes time library when compiling using Visual Studio. I had to rename time library to be able to get it working.