File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
examples/WeatherStationDemo Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,10 @@ See more at https://thingpulse.com
5555const char * WIFI_SSID = " yourssid" ;
5656const char * WIFI_PWD = " yourpassw0rd" ;
5757
58- #define TZ 2 // (utc+) TZ in hours
59- #define DST_MN 60 // use 60mn for summer time in some countries
58+ // Timezone
59+ // Enter a POSIX timezone string. A current list can be found here:
60+ // https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv
61+ #define TZ " CET-1CEST,M3.5.0,M10.5.0/3"
6062
6163// Setup
6264const int UPDATE_INTERVAL_SECS = 20 * 60 ; // Update every 20 minutes
@@ -116,9 +118,6 @@ OpenWeatherMapCurrent currentWeatherClient;
116118OpenWeatherMapForecastData forecasts[MAX_FORECASTS];
117119OpenWeatherMapForecast forecastClient;
118120
119- #define TZ_MN ((TZ)*60 )
120- #define TZ_SEC ((TZ)*3600 )
121- #define DST_SEC ((DST_MN)*60 )
122121time_t now;
123122
124123// flag changed in the ticker function every 10 minutes
@@ -179,7 +178,7 @@ void setup() {
179178 counter++;
180179 }
181180 // Get time from network time service
182- configTime (TZ_SEC, DST_SEC , " pool.ntp.org" );
181+ configTzTime (TZ , " pool.ntp.org" );
183182
184183 ui.setTargetFPS (30 );
185184
You can’t perform that action at this time.
0 commit comments