Hi, i’m stuck with this problem for longer than i would want to…
After importing “time.h” to my projeckt every thing was fine until i’ve tried to use methods “configTime” and “setenv”. i’m getting error that they are not defined. Despite "tm’ and “time_t” are working fine.
I’ve also discovered that half of the “time.h” file is not fully highlighted in vs code.
I’ve tried deleting the class, changing name of the class etc. nothing works. Sometimes after doing nothing meaningful “configtime” starts working…
Tried this fix and nothing
VSC: 1.55.1
PIO: Core: 5.2.0a5, Home: 3.3.4
ESP32 core: 1.0.6
Hello, I noticed that time.h is somehow not recognized although no error is flagged in the source code in regards to a missing library.
When I compile the source code below, I get the error message:
src\main.cpp:16:51: error: 'strftime' was not declared in this scope
It does compile fine though in the Arduino IDE which makes me think it might be an issue with PIO or VSC.
#include <Arduino.h>
#include <time.h>
//---------------…
Does anyone knows what’s going on?
If you are trying to use GitHub - PaulStoffregen/Time: Time library for Arduino , try including “TimeLib.h” instead of time.h