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:
- 30:2740e128a809
- Parent:
- 26:9ee3fac64626
--- a/TimeInterface.cpp Mon Jan 14 03:17:30 2019 +0000 +++ b/TimeInterface.cpp Wed Apr 03 22:26:47 2019 +0000 @@ -195,6 +195,8 @@ struct tm_ex tmp = *timeptr; tmp.tm_min += tmp.tm_tzo_min; + if (tmp.tm_isdst) + tmp.tm_min += 60; while (tmp.tm_min >= 60) { tmp.tm_min -= 60; tmp.tm_hour++;