Skip to content

strptime build error within new Arduino Core framework v3.0.0 #248

Closed
@Lukas-Heiligenbrunner

Description

@Lukas-Heiligenbrunner

A build error occurs with the newest Arduino core version v3.0.0 :

lib/framework/NTPSettingsService.cpp: In member function 'void NTPSettingsService::configureTime(AsyncWebServerRequest*, ArduinoJson::JsonVariant&)':
lib/framework/NTPSettingsService.cpp:78:15: error: 'strptime' was not declared in this scope; did you mean 'strftime'?
   78 |     char* s = strptime(timeLocal.c_str(), "%Y-%m-%dT%H:%M:%S", &tm);
      |               ^~~~~~~~
      |               strftime

This seems to be caused by a disabled prototype.
To fix this you could define your prototype by your own somewhere:

extern "C" char *strptime (const char *__restrict, const char *__restrict, struct tm *__restrict);

--> see esp8266/Arduino#8122

Kind regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions