Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CronAlarms - NtpClient/Time #13

Open
kleinmantara opened this issue Feb 18, 2021 · 1 comment
Open

CronAlarms - NtpClient/Time #13

kleinmantara opened this issue Feb 18, 2021 · 1 comment

Comments

@kleinmantara
Copy link

I use the NtpClient library, which is dependent on the TimeLib library, to synchronize the time with an NTP server on an ESP8266.
I know that the ESP8266 SDK now also has an NTP mechanism. The NtpClient library has a few nice features that are missing in the SDk, so I use them.

In conjunction with the CronAlarms I have a time difference of one hour. If I get the time via the TimeLib, the time is correct.

TimeLib: 20:47:52 18.02.2021
time:.h  Thu Feb 18 19:47:51 2021

Do you have an idea or tip where I have to set the time difference - possibly TimeZone - correctly?

Links

@Martin-Laclaustra
Copy link
Owner

This works for Europe:
configTzTime("CET-1CEST,M3.5.0,M10.5.0/3", "pool.ntp.org"); // Timezone for CET, check TZ.h or https://www.iana.org/time-zones
Please report back if that solved your problem (or not).
I assume that you are using the appropriate POSIX functions to get the "local" time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants