diff --git a/examples/EspDateTime/EspDateTime.ino b/examples/EspDateTime/EspDateTime.ino index 8531649..948dcdf 100644 --- a/examples/EspDateTime/EspDateTime.ino +++ b/examples/EspDateTime/EspDateTime.ino @@ -19,11 +19,18 @@ 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(); @@ -53,4 +60,4 @@ void loop() { } delay(1000); -} \ No newline at end of file +}