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

@@ -689,6 +689,7 @@ void setup()
screen = new graphics::Screen(screen_found, screen_model, screen_geometry);
// setup TZ prior to time actions.
#if !MESHTASTIC_EXCLUDE_TZ
if (*config.device.tzdef) {
setenv("TZ", config.device.tzdef, 1);
} else {
@@ -696,6 +697,7 @@ void setup()
}
tzset();
LOG_DEBUG("Set Timezone to %s\n", getenv("TZ"));
#endif
readFromRTC(); // read the main CPU RTC at first (in case we can't get GPS time)