Hello, on my Esp32 clock the time change today to summertime. However this should happen at the 28.3 not at the 14.3 in Germany. Im using Esp32's time Lib and i don't know how to change it.
Thanks for every Help!
Ntp Sumertime changes at the Amerikan Date
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: Ntp Sumertime changes at the Amerikan Date
No such thing, you're probably using a 3rd party lib, one from a different SDK, or the ESP-IDF POSIX built-in functions. In case of the last, refer to the manual. In case you don't use that, please specify what you do use.Esp32's time Lib
Re: Ntp Sumertime changes at the Amerikan Date
Honestly I am a bit confused, what im using, because i use the one which comes with the esp32 i just include time.h and the functions are the same like in ESP-IDF POSIX but the ntp syncronization is done differently. I folowed the guide on https://randomnerdtutorials.com/esp32-d ... r-arduino/
Re: Ntp Sumertime changes at the Amerikan Date
The arduino function configTime does not let you set the dst rule and so defaults to US rule
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: Ntp Sumertime changes at the Amerikan Date
However, I think you should still be able to set the timezone using the TZ variable; refer to the manual page I linked earlier. Specifically, something like
and then using 'localtime' to get the time should work.
Code: Select all
// Set timezone to China Standard Time
setenv("TZ", "CST-8", 1);
tzset()
Who is online
Users browsing this forum: audris and 104 guests