| 17 | constexpr auto* TIMEZONE_PREFERENCES_KEY_TIME24 = "tz_time24"; |
| 18 | |
| 19 | void initTimeZone() { |
| 20 | #ifdef ESP_PLATFORM |
| 21 | auto code= getTimeZoneCode(); |
| 22 | if (!code.empty()) { |
| 23 | setenv("TZ", code.c_str(), 1); |
| 24 | tzset(); |
| 25 | } |
| 26 | #endif |
| 27 | } |
| 28 | |
| 29 | void setTimeZone(const std::string& name, const std::string& code) { |
| 30 | Preferences preferences(TIME_SETTINGS_NAMESPACE); |
no test coverage detected