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>
//-----------------------------------------------
void setup()
{
Serial.begin(115200);
}
//====================================================================
void loop()
{
struct tm *ptm; // 'struct tm' enthält die Komponenten einer Kalenderzeit
char timeStrBuf [5];
getLocalTime(ptm);
strftime(timeStrBuf, sizeof(timeStrBuf), "%H:%M", ptm);
String sysTimeStr = String(timeStrBuf);
}
Any suggestions how to overcome this?
Thank you!
Werner