2016-12-31 00:38:51 +01:00
|
|
|
/*
|
|
|
|
* Acquires time from NTP server
|
|
|
|
*/
|
|
|
|
|
2016-12-29 00:03:58 +01:00
|
|
|
void handleNetworkTime()
|
|
|
|
{
|
2017-02-07 14:24:42 +01:00
|
|
|
|
2016-12-29 00:03:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
String getTimeString()
|
|
|
|
{
|
2016-12-31 00:38:51 +01:00
|
|
|
local = TZ.toLocal(now(), &tcr);
|
2016-12-29 00:03:58 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|