From 2afceed78138e3298dec4334bc67672568655f2a Mon Sep 17 00:00:00 2001 From: Correl Date: Sat, 28 Jan 2023 22:57:17 -0500 Subject: [PATCH] Set timezone on startup --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 4c66dfa..cd2fddb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -209,6 +209,10 @@ App::Choices current_app; void setup(void) { auto cfg = M5.config(); M5.begin(cfg); + + setenv("TZ", NTP_TIMEZONE, 1); + tzset(); + M5.Display.init(); M5.Display.setTextSize(3); M5.Display.setCursor(0, M5.Display.height() / 4);