Skip to content

Commit

Permalink
#ifdef instead of #if ESP8266
Browse files Browse the repository at this point in the history
  • Loading branch information
hasenradball committed Nov 27, 2024
1 parent b4d8bec commit 56cbcdf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/cMESZ/cMESZ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ bool MESZ::isSummerTime(time_t _ti) {
int MESZ::setUnixTime(timeval * tv) {
_tv = {tv->tv_sec, tv->tv_usec};
int status = settimeofday(&_tv, nullptr);
#if ESP8266
#ifdef ESP8266
setTZ(_timezone);
#elif ESP32
#endif
#ifdef ESP32
setenv("TZ", _timezone, 1);
tzset();
#endif
Expand Down

0 comments on commit 56cbcdf

Please sign in to comment.