stelgenhof / ntpclient Goto Github PK
View Code? Open in Web Editor NEWNTP Client library for ESP8266 with full timezone support
License: Other
NTP Client library for ESP8266 with full timezone support
License: Other
Hej
I am testing your code on a SonOff Th10 but I have a slight problem the first sync gives me the wrong time.
Serial print follows
`MDNS responder started
HTTP server started
....Got IP: 192.168.1.21
Got NTP time: 1970-01-01T00:00:08 last sync 1970-01-01T09:00:02
Got NTP time: 1970-01-01T09:01:02 last sync 2018-01-08T14:57:02
Got NTP time: 2018-01-08T14:58:03 last sync 2018-01-08T14:58:04
Got NTP time: 2018-01-08T14:59:05 last sync 2018-01-08T14:59:05
`
I have changed to print out the current time also.
`
case NTP_EVENT_SYNCHRONIZED:
Serial.printf("Got NTP time: %s last sync %s\n", NTP.getTimeDate(now()), NTP.getTimeDate(NTP.getLastSync()));
break;`
Any ideas whats going on. The NTP server works when using regular ntpdate so thats not the issue.
I was thinking maybe I could force the update in setup but gettime is private so that is not an option at this stage.
cheers
Dear Sir,
I have Arduino IDE 1.6.9 installed at Windows 10 laptop, and I tried to install your library both with the manual way ( download,, extract / rename the unzipped directory as NTPClient and transferred to the appropriate library directory ) and the Arduino "Add .ZIP library ..." way, both without success unfortunately... In the "Add .ZIP library ..." I got the following error: "Specified folder/zip file does not contain a valid library"
and in the manual way invalid library as well.
Please guide me what is wrong...
Thanks and Best Regards,
Mike Kranidis
P.S. Sorry, I forgot to say a BIG THANKS for your fine as I can understand library (sorry not possible to run it yet...!)
Hi,
i have my own timeserver in my LAN.
How can i use the local IP instead of a domain?
Implement DST Support.
The example program NTPClient repeatedly calls const char *NTPClient::getTimeDate(time_t tm).
This method allocates a char buffer and returns a pointer to this buffer to the caller.
NTPClient.ino should free these pointers but doesn't.
The (demonstrated) result is that 24 bytes of the heap is lost on each call of getTimeDate () and the program finally crashes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.