SergeS
April 17, 2020, 7:25pm
1
Looking for recommendations for NTP library.
Have played with this one: link , it works good, but i need more functionality - specify timeout, get date, specify more than one NTP servers...
Could anyone recommend?
Are there any library automatically setup timezone (and DST?) based on your location getting over wifi?
Juraj
April 17, 2020, 7:58pm
2
see the NTP-TZ-DST example for the esp8266 (dummy) library in IDE Examples menu
SergeS
April 18, 2020, 12:49am
3
Juraj:
see the NTP-TZ-DST example for the esp8266 (dummy) library in IDE Examples menu
I did not get how it should work, seems like it is not working on me...
I have edited my wifi credentials only, and this is what I've got.
Starting...
Time is currently set by a constant:
localtime: isdst=0 yday=316 wday=1 year=117 mon=10 mday=13 hour=17 min=7 sec=5
gmtime: isdst=0 yday=316 wday=1 year=117 mon=10 mday=13 hour=17 min=7 sec=5
clock: 0s / 63447000ns
millis: 63
micros: 63469
gtod: 1510592825s / 3431us
time: 1510592825
timezone: GMT0BST,M3.5.0/1,M10.5.0
ctime: Mon Nov 13 17:07:05 2017
localtime: isdst=0 yday=316 wday=1 year=117 mon=10 mday=13 hour=17 min=8 sec=4
gmtime: isdst=0 yday=316 wday=1 year=117 mon=10 mday=13 hour=17 min=8 sec=4
clock: 60s / 59087000ns
millis: 60059
micros: 60059111
gtod: 1510592884s / 999066us
time: 1510592884
timezone: GMT0BST,M3.5.0/1,M10.5.0
ctime: Mon Nov 13 17:08:04 2017
sntp0: 50.116.55.65 IPv6: No Reachability: 0
localtime: isdst=0 yday=316 wday=1 year=117 mon=10 mday=13 hour=17 min=9 sec=4
gmtime: isdst=0 yday=316 wday=1 year=117 mon=10 mday=13 hour=17 min=9 sec=4
clock: 120s / 59069000ns
millis: 120059
micros: 120059094
gtod: 1510592944s / 999053us
time: 1510592944
timezone: GMT0BST,M3.5.0/1,M10.5.0
ctime: Mon Nov 13 17:09:04 2017
sntp0: 50.116.55.65 IPv6: No Reachability: 0
localtime: isdst=0 yday=316 wday=1 year=117 mon=10 mday=13 hour=17 min=10 sec=4
gmtime: isdst=0 yday=316 wday=1 year=117 mon=10 mday=13 hour=17 min=10 sec=4
clock: 180s / 59072000ns
millis: 180059
micros: 180059098
gtod: 1510593004s / 999056us
time: 1510593004
timezone: GMT0BST,M3.5.0/1,M10.5.0
ctime: Mon Nov 13 17:10:04 2017
sntp0: 50.116.55.65 IPv6: No Reachability: 0
and so on...