Real Time Clock. get time-str, set time.
Diff: RealTimeClock.h
- Revision:
- 4:d1c394cd7b63
- Parent:
- 2:32cfa1dac5a2
- Child:
- 5:82e566457502
--- a/RealTimeClock.h Fri Oct 16 07:00:44 2015 +0000 +++ b/RealTimeClock.h Thu Nov 19 07:56:35 2015 +0000 @@ -10,12 +10,6 @@ */ class RealTimeClock { -private: - time_t secRT; // secondsRealTime. JST; 9hour - char buf[14]; // using for strftime() - string bufTmp; // return value - void setSecondsRealTime(); // set secRt; - public: /** @rtnval YY/MM/DD */ string getYMD8(); @@ -30,15 +24,21 @@ string getHMS6(); /** - * @param seconds from 1970/01/01. + * @param 'seconds' from 1970/01/01. * @rtnval success(true), failure(false) */ - bool setRealTime(string str); + bool setRealTime(string str, bool JPN= true); /** * @param seconds from 1970/01/01. * @rtnval void */ - bool setRealTime(long now); + bool setRealTime(long now, bool JPN= true); + +private: + time_t secRT; // secondsRealTime. JST; 9hour + char buf[14]; // using for strftime() + string bufTmp; // return value + void setSecondsRealTime(); // set secRt; }; \ No newline at end of file