-
Notifications
You must be signed in to change notification settings - Fork 1.2k
strftime strftime strftime #60
Comments
old ESP8266 Arduino? |
Tried with 1.6.8 and 1.6.9 Some how it compiled once but now it doesn't without any change in sketch... Trying to convert https://github.com/gmag11/FSBrowser/ to ESPAsyncWebServer |
https://community.platformio.org/t/errors-after-updating-espasyncwebserver/476 changing name to _time.h didn't solve .. |
comment on ifdef and everything is ok. |
interesting.... that makes no sense... |
I uploaded same sketch maybe 10 times now it is giving exception again... Documents/Arduino/libraries/ESPAsyncWebServer-master/src/WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(tm*)': Can it be a core problem with time lib? |
time.h is located here. See if you have that file |
my lib have a Time.h and only one row : #include "TimeLib.h" TimeLib.h
How to include / install time.h ? |
I reinstall esp8266 2.3 and no problem now. I am not sure if it makes trouble again. Thank you Markus. |
Again... Sketch and all error here -- > https://github.com/kiralikbeyin/convert-to-async |
/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include replace in WebHandlerImpl.h I will give info when i get problem again... |
I have the same problems. |
@kiralikbeyin For windows the path is: |
I am getting this error too. It's clearly caused by the TimeLib.h library. This is a kludge fix to modify the core files. New releases will overwrite the fix. |
Probably we have an conflict with NtpClientLib.h |
HI, |
replace in WebHandlerImpl.h #include <time.h> to #include <_time.h> |
I got out with an easy way. |
If you are using platformio you can add in your
|
While compiling for an ESP in 1.8.3 IDE I too haye this error :-( |
I'd like to second mathurv's comment above - renaming "Time.h" to "_Time.h" in the libraries folder fixed the issue for me. However I have not tested if this has any repercussions on other sketches or projects. |
For me this problem with the great Timezone library was a real headache for a long time. From that change on ESP8266 core libs, Timezone refused to compile and there was no way to solve it (for me renaming time.h to _time.h in ESP8266 core libs is not help) until it did not replace in Timezone.h the reference to Time.h by TimeLib.h Regards |
Yes we have the same issues on Mac as well. Case insensitive file systems can not distinguish Time.h from time.h and Arduino puts Libraries after the core/sdk so it picks up Time.h instead. Honestly Time.h should have never been named Time.h for that exact reason (time.h is the standard *nix header and present in ESP SDKs) but since it's too late to change that, we are in a sticky situation now and from now on... |
Totally agree whit you @me-no-dev. Of course all library developers need take so much care with this weird "naming" issues, because can easily avoid to useless their contributions in a very short time. PD: Thank you so so much @me-no-dev for all your contributions here. Best regards. |
I read all the infos above. Have I understand them in the right way and actually there is no solution for using strftime with ESP8266? |
Rename Time.h in Timelib |
Arduino/libraries/ESPAsyncWebServer-master/src/WebHandlers.cpp:67:64: error: 'strftime' was not declared in this scope
strftime (result,30,"%a, %d %b %Y %H:%M:%S %Z", last_modified);
^
Arduino/libraries/ESPAsyncWebServer-master/src/WebHandlers.cpp:72:60: error: 'strftime' was not declared in this scope
return setLastModified((struct tm *)gmtime(&last_modified));
Arduino/libraries/ESPAsyncWebServer-master/src/WebHandlers.cpp:77:25: error: 'strftime' was not declared in this scope
if(time(&last_modified) == 0) //time is not yet set
How to solve?
The text was updated successfully, but these errors were encountered: