ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
tzset_stubs.cpp
Go to the documentation of this file.
1/*
2 * Linker wrap stub for picolibc's _tzset_unlocked().
3 *
4 * strftime() and mktime() call it to load the time zone from the TZ variable,
5 * and its parser links the C library's scanf engine. ESPHome never sets TZ (it
6 * parses the time zone itself and fills in %Z and %z), so the call would only
7 * reapply the defaults tzname, _timezone and _daylight already have. An
8 * explicit tzset() still parses TZ: its call is inside the same object. Code
9 * that sets TZ must call tzset() itself; the lazy reload is skipped.
10 */
11
13
14#ifdef USE_ESP32
15
16namespace esphome::esp32 {}
17
18// NOLINTBEGIN(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp,readability-identifier-naming)
19extern "C" void __wrap__tzset_unlocked() {}
20// NOLINTEND(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp,readability-identifier-naming)
21
22#endif // USE_ESP32
void __wrap__tzset_unlocked()