Adds MESHTASTIC_EXCLUDE_TZ option (#4423)

This commit is contained in:
Jonathan Bennett
2024-08-09 00:52:31 -05:00
committed by GitHub
parent 5b4530325f
commit a7da3537e2
3 changed files with 8 additions and 1 deletions

View File

@@ -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
}