-
Notifications
You must be signed in to change notification settings - Fork 13.3k
undefined reference to `sntp_get_timezone' #7392
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
Comments
seems it is not present in lwip v2, you need to use v1.4 |
Where do i specify it ? ... is it a #define or something ? thanks |
in arduino ide check the esp8266 compilation settings |
It has been removed in an optimization process because this function was an import from espressif timezone api (not part of lwIP), which was broken, and not used in the arduino API. Now, you basically only need to use If you really need to know time relative to UTC, you can do that with
You'll get local time and UTC time in respective above |
@pulsartronic lwIP 1.4 is removed in master and won't be available in next releases. |
@d-a-v sorry ... yes it is ok to me, thank you very much |
@d-a-v hello local and utc end up having the exact same value, no matter what timezone is configured with have you tried ? ... is it intended ? |
Yes I tried |
Hi, this is the output of the example localtime: isdst=1 yday=244 wday=2 year=120 mon=8 mday=1 hour=19 min=5 sec=30 localtime and gmtime have the right values when reading from tm structure, like this time_t lt = time(nullptr);
tm* ltm = localtime(<);
time_t gt = time(nullptr);
tm* gtm = gtmtime(>); yet "lt" and "gt" have the same value, it is the UTC value ... am i doing something wrong ? should gtod and time be the same ? |
https://linux.die.net/man/2/time https://linux.die.net/man/3/localtime I should revisit the example to use only one call to
There's no proper/direct way for that to my knowledge. |
Guys, I'm trying lear about IoT using a ESP8266 and Azure, but it's really tough, the last version of the libraries do not work and show tons of errors. After some downgrades I have installed: Board: Libraries: And when I try compile my code I receive this error: "\libraries\AzureIoTHubMQTTClient\NtpClientLib_ESP.cpp.o:(.text._ZN9NTPClient7getTimeEv+0x2c): undefined reference to `sntp_get_timezone'". What I must do now to put my code to run, some tip? Thanks. |
Hello, upgrading from 2.6.3 to 2.7.1 the following code does not compile anymore ...
It throws this error:
Context:
SO: Ubuntu 18.04
IDE: Arduino IDE 1.8.12
Lib: esp8266 2.7.1
Am I doing something wrong ? ... any guide would be really apreciatted
The text was updated successfully, but these errors were encountered: