A time interface class. This class replicates the normal time functions, but goes a couple of steps further. mbed library 82 and prior has a defective gmtime function. Also, this class enables access to setting the time, and adjusting the accuracy of the RTC.
Dependents: CI-data-logger-server WattEye X10Svr SSDP_Server
Diff: TimeInterface.cpp
- Revision:
- 17:45dae5a72679
- Parent:
- 11:1d880a50da8a
- Child:
- 18:dcd46f9e98fa
--- a/TimeInterface.cpp Sat Mar 04 16:57:43 2017 +0000 +++ b/TimeInterface.cpp Wed Apr 12 02:25:22 2017 +0000 @@ -742,5 +742,7 @@ break; } } + if (mktime(tm) == (time_t)-1) + tm->tm_wday = 7; return buf; }