DST nun auf 3600

Restart täglich um 0h00
This commit is contained in:
rxf
2025-04-13 00:08:05 +02:00
parent 5529ece98f
commit 664d91d6f4
4 changed files with 15 additions and 4 deletions

View File

@@ -160,4 +160,10 @@ void updateDateTime(struct tm tinfo) {
int year = tinfo.tm_year + 1900;
sprintf(date, "%s, %d. %s %d", wday[wd], day, month[mo], year);
setDateTime(time, date);
// Check if day has just changed
if (timeinfo.tm_hour = 0 && timeinfo.tm_min == 0 && timeinfo.tm_sec == 0) {
esp_restart();
}
}

View File

@@ -20,6 +20,7 @@ TimerHandle_t wifiReconnectTimer;
int bmeReadTime = 10000;
int updateTime = 30000;
struct tm timeinfo;
int oldDay = 0;
#else
extern const char* wday[7];
extern const char* month[12];

View File

@@ -1,11 +1,15 @@
// Versionsgeschichte
#define VERSION "1.6.3"
#define VDATE "2024-10-27"
#define VTIME "09:00 UTC"
#define VERSION "1.6.5"
#define VDATE "2025-04-12"
#define VTIME "23:00 UTC"
/*
Version Date Author
1.6.4 2025-04-12 rxf
- Neuer Versuchmit DST
- täglich um 0h00 Restart
1.6.3 2024-10-27 rxf
- Daylight-Saving-Time (DST) berücksichtigt (DST-Offset = 0!!)

View File

@@ -17,7 +17,7 @@
#ifdef WEIFI
const char *ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 3600;
const int daylightOffset_sec = 0;
const int daylightOffset_sec = 3600;
WebServer server(80);