Configure timezone
This commit is contained in:
parent
a64e078674
commit
69338454d4
1 changed files with 7 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue