Update EspDateTime.ino
GMT and Force update
This commit is contained in:
parent
30552d5379
commit
99ae6c4ba0
@ -19,12 +19,19 @@ void setup() {
|
||||
}
|
||||
|
||||
timeClient.begin();
|
||||
timeClient.setTimeOffset(10800); //GMT+3
|
||||
timeClient.update();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
timeClient.update();
|
||||
|
||||
/*
|
||||
while(!timeClient.update()) {
|
||||
timeClient.forceUpdate();
|
||||
}
|
||||
*/
|
||||
|
||||
if (timeClient.isTimeSet()) {
|
||||
unsigned long epochTime = timeClient.getEpochTime();
|
||||
struct tm *timeinfo;
|
||||
|
Loading…
Reference in New Issue
Block a user