Comments (4)
For general clock functions, I use the excellent https://github.com/PaulStoffregen/Time library and use NTP as a time sync provider.
#include "TimeLib.h"
time_t ntpSyncProvider() {
return timeClient.getEpochTime();
}
then:
setSyncProvider(&ntpSyncProvider);
That library does include an NTP example but I prefer using this NTPClient.
from ntpclient.
I don't think adding time formatting to this library is a good idea. In my opinion any further time formatting should be done externally. The getFormattedTime()
function is just to get you started.
from ntpclient.
I agree with @FWeinb on this.
If it doesn't exist already, a separate date formatting/parsing Arduino library would be ideal.
from ntpclient.
According to me I am missing: getMonth, getYear and getDay (not
day of the week)
from ntpclient.
Related Issues (20)
- Release 3.2.0 makes ESP32 error and boot loop HOT 1
- Checking received data for correctness and verbose debugging
- on esp32 with fixed ip, it doesn't work HOT 1
- Time offsets >±32,535 seconds still busted in version 3.2.0 HOT 1
- getting 16 hours more that the current
- NTPClient::update() now always returns `false` HOT 10
- isTimeSet() does not reset when update fail HOT 1
- Memory buffer could be stack allocated, saving global memory. HOT 2
- what will the timeClient.update() function do when there's no internet HOT 1
- getFormattedDate() in 3.1.0 no longer in latest3.2.1 HOT 1
- Poll interval is much to often
- NTP Time Incorrect HOT 1
- Add set function to define the response timeout
- Add the functionallity to get the date HOT 1
- Add handling for NTP server returning 0 HOT 4
- Missing method HOT 1
- Automatic summer/winter time change HOT 1
- So Funny ehehehe (LOL) Please read this.
- Change signature of function to set the offset to long HOT 1
- How to set automatic summer/winter time? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ntpclient.