mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
Adds MESHTASTIC_EXCLUDE_TZ option (#4423)
This commit is contained in:
@@ -256,6 +256,7 @@ uint32_t getValidTime(RTCQuality minQuality, bool local)
|
||||
|
||||
time_t gm_mktime(struct tm *tm)
|
||||
{
|
||||
#if !MESHTASTIC_EXCLUDE_TZ
|
||||
setenv("TZ", "GMT0", 1);
|
||||
time_t res = mktime(tm);
|
||||
if (*config.device.tzdef) {
|
||||
@@ -264,4 +265,7 @@ time_t gm_mktime(struct tm *tm)
|
||||
setenv("TZ", "UTC0", 1);
|
||||
}
|
||||
return res;
|
||||
#else
|
||||
return mktime(tm);
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user