Giter Site home page Giter Site logo

stelgenhof / ntpclient Goto Github PK

View Code? Open in Web Editor NEW
41.0 3.0 10.0 18 KB

NTP Client library for ESP8266 with full timezone support

License: Other

C++ 100.00%
timezone ntp-server sntp ntpclient-library ntp-client esp8266 synchronization utc-offsets supporting-timezones

ntpclient's People

Contributors

stelgenhof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ntpclient's Issues

First NTP sync is wrong

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

Not possible to install the library

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...!)

How to use local IP

Hi,

i have my own timeserver in my LAN.
How can i use the local IP instead of a domain?

NTPCLient.ino doesn't free the char buffer allocated inside NTPClient::getTimeDate

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.