WLED/wled00/wled10_ntp.ino

29 lines
510 B
Arduino
Raw Normal View History

/*
* Acquires time from NTP server
*/
void handleNetworkTime()
{
2017-02-07 14:24:42 +01:00
}
String getTimeString()
{
local = TZ.toLocal(now(), &tcr);
String ret = monthStr(month(local));
ret = ret + " ";
ret = ret + day(local);
ret = ret + " ";
ret = ret + year(local);
ret = ret + ", ";
ret = ret + hour(local);
ret = ret + ":";
if (minute(local) < 10) ret = ret + "0";
ret = ret + minute(local);
ret = ret + ":";
if (second(local) < 10) ret = ret + "0";
ret = ret + second(local);
return ret;
}