Configure timezone

This commit is contained in:
Robert Marshall 2023-09-15 11:06:03 +01:00
parent a64e078674
commit 69338454d4

View file

@ -36,6 +36,12 @@ NaturalLight _naturalLight = NaturalLight(_wifiClient, LATITUDE, LONGITUDE, TIME
Weather _weather = Weather(_wifiClient, LATITUDE, LONGITUDE);
Lighting _lighting = Lighting(&_naturalLight, &_weather, CLOUD_COVER_LIMIT);
void setupTime(){
configTime(0, 0, NTP_POOL);
setenv("TZ", "GMT0BST,M3.5.0/2,M10.5.0/2", 0);
delay(1000);
}
void setup() {
Serial.begin(115200);
analogWriteRange(PWMRANGE);
@ -52,7 +58,7 @@ void setup() {
_sensors.setup();
delay(2000);
configTime(0, 0, NTP_POOL);
setupTime();
_naturalLight.update();
_weather.update();