Reputation: 1
strftime has stopped working in my platformIO project. It was running fine this morning and i don't see what i've changed that could cause this.
The error i'm getting is identifier "strftime" is undefined
. The time.h file where this should be pulled out of now looks like this:
#ifndef _ESP_TIME_H
#define _ESP_TIME_H
#ifdef __cplusplus
extern "C" {
#endif
#include_next <time.h>
#define _POSIX_TIMERS 1
#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC (clockid_t)4
#endif
#ifndef CLOCK_BOOTTIME
#define CLOCK_BOOTTIME (clockid_t)4
#endif
int clock_settime(clockid_t clock_id, const struct timespec *tp);
int clock_gettime(clockid_t clock_id, struct timespec *tp);
int clock_getres(clockid_t clock_id, struct timespec *res);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_TIME_H */
This suggests the platformIO building tool is trying to build with the esp-idf framework instead of the arduino framework i have configured in platformIO.ini.
Any input would be greatly appreciated, i'm at a loss...
I have tried deleting the .pio folder in my project, the framework folder in platformIO's packages folder and i have tried the clean and full clean commands.
Upvotes: 0
Views: 83
Reputation: 1
I found a workaround where i can use strftime_l()
and just call it with localisation argument NULL
.
Upvotes: 0