diff --git a/src/main.cpp b/src/main.cpp index d17c70c..e6ae2ef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -99,7 +99,7 @@ void setup() { time_t now; struct tm timeinfo; time(&now); - setenv("TZ", "Europe/Berlin", 1); + setenv("TZ", "CET-1CEST,M3.5.0/2,M10.5.0/3", 1); tzset(); localtime_r(&now, &timeinfo); @@ -269,8 +269,6 @@ void loop() time_t now; struct tm timeinfo; time(&now); - setenv("TZ", "Europe/Berlin", 1); - tzset(); localtime_r(&now, &timeinfo); strftime(timeStr, sizeof(timeStr), "%H:%M:%S", &timeinfo); diff --git a/src/screen.cpp b/src/screen.cpp index 44c9821..23a8121 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -330,6 +330,9 @@ void AlarmClockScreen::previous() { } uint8_t AlarmClockScreen::select() { + time_t now; + time(&now); + while(difftime(now, mktime(&alarmTime)) >= 0) alarmTime.tm_mday++; setAlarmTime(alarmTime); menuChange = eMainScreen; }