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.h
- Revision:
- 3:49f36b489b64
- Parent:
- 2:65e0a25c7551
- Child:
- 4:9cae2da8215e
diff -r 65e0a25c7551 -r 49f36b489b64 TimeInterface.h --- a/TimeInterface.h Sun Jun 22 21:00:01 2014 +0000 +++ b/TimeInterface.h Sat Jun 28 19:49:26 2014 +0000 @@ -209,6 +209,23 @@ /// int16_t get_tzo_min(void); + /// Set the clock for local time to report whether the current + /// mode is standard or daylight savings time. + /// + /// return values for localtime will then be adjusted not only + /// for the time zone offset, but for dst. + /// + /// @param[in] dst is a boolean that should be set when dst is + /// the active mode. + /// + void set_dst(bool dst); + + /// Get the current clock mode for daylight savings time. + /// + /// @returns true if clock is in dst mode. + /// + bool get_dst(void); + /// Get the time value when the clock was last set. This is most /// often used in calibration of the clock. ///