File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -74,9 +74,21 @@ DateTime SystemClock::now() {
7474
7575String SystemClock::getTime () {
7676 DateTime dt = now ();
77- return _clock-> formatTime (dt);
77+ return formatTime (dt);
7878}
7979
8080String SystemClock::getStartupTime () {
81- return _clock->formatTime (startupTime);
81+ return formatTime (startupTime);
82+ }
83+
84+ String SystemClock::formatTime (DateTime dt) {
85+ return _clock->formatTime (dt);
86+ }
87+
88+ String SystemClock::formatDate (DateTime dt) {
89+ return _clock->formatDate (dt);
90+ }
91+
92+ String SystemClock::formatDateTime (DateTime dt) {
93+ return _clock->formatDateTime (dt);
8294}
Original file line number Diff line number Diff line change @@ -28,15 +28,16 @@ class SystemClock
2828 DateTime now ();
2929 String getTime ();
3030 String getStartupTime ();
31+ String formatTime (DateTime dt);
32+ String formatDate (DateTime dt);
33+ String formatDateTime (DateTime dt);
3134 DateTime startupTime;
3235
3336 private:
3437 char * _ntpServer;
3538 long _gmtOffset_sec;
3639 int _daylightOffset_sec;
3740 DS3231_RealtimeClock* _clock;
38-
39- String formatTime (DateTime dt);
4041};
4142
4243#endif
You can’t perform that action at this time.
0 commit comments