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.

Dependencies:   CalendarPage

Dependents:   CI-data-logger-server WattEye X10Svr SSDP_Server

Revision:
5:a5f50b5fb856
Parent:
3:49f36b489b64
Child:
6:c79cfe750416
--- a/TimeInterface.cpp	Mon Jan 19 13:36:15 2015 +0000
+++ b/TimeInterface.cpp	Thu Aug 06 11:13:47 2015 +0000
@@ -43,7 +43,7 @@
 {
     NTPClient ntp;
     NTPResult res;
-    int16_t tzomin = get_tzo_min();
+    // int16_t tzomin = get_tzo_min();
     INFO("setTime(%s, %d, %d) %d\r\n", host, port, timeout, tzomin);
     res = ntp.setTime(host, port, timeout);
     INFO("  ret: %d\r\n", res);
@@ -239,7 +239,7 @@
     if (lastSet != 0) {
         time_t seconds = time(NULL);    // get "now" according to the rtc
         int32_t delta = seconds - lastSet;
-        int32_t curCal = get_cal();
+        //int32_t curCal = get_cal();   // calibration might want to leverage the current cal factor.
         int32_t calMAX = 131071;
         int32_t secPerDay = 86400;
         float errSecPerDay;