We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cd0f63 commit a51b2d5Copy full SHA for a51b2d5
src/utility/time/TimeService.cpp
@@ -140,6 +140,11 @@ unsigned long TimeService::getTime()
140
return isTimeValid(utc) ? utc : EPOCH_AT_COMPILE_TIME;
141
}
142
143
+void TimeService::setTime(unsigned long time)
144
+{
145
+ setRTC(time);
146
+}
147
+
148
#ifdef HAS_TCP
149
bool TimeService::sync()
150
{
src/utility/time/TimeService.h
@@ -38,6 +38,7 @@ class TimeService
38
39
void begin (ConnectionHandler * con_hdl);
40
unsigned long getTime();
41
+ void setTime(unsigned long time);
42
unsigned long getLocalTime();
43
void setTimeZoneData(long offset, unsigned long valid_until);
44
0 commit comments