Timezone.h problem [SOLVED]
Posted: Mon Aug 17, 2015 1:56 pm
Hi all,
In my ESP8266, I am trying to get Daylight-Savings-Time (DST) to work with the Time.h library. Below is a short clip of code that works just fine. But when I un-comment the second line and '#include <Timezone.h>' then it will no longer compile. I get this error message: 'fatal error: avr/eeprom.h: No such file or directory #include <avr/eeprom.h>'
How do I get rid of the error and get the code to run so that I can use the Timezone methods??
Regards, Peter.
In my ESP8266, I am trying to get Daylight-Savings-Time (DST) to work with the Time.h library. Below is a short clip of code that works just fine. But when I un-comment the second line and '#include <Timezone.h>' then it will no longer compile. I get this error message: 'fatal error: avr/eeprom.h: No such file or directory #include <avr/eeprom.h>'
How do I get rid of the error and get the code to run so that I can use the Timezone methods??
Regards, Peter.
Code: Select all
#include <Time.h>
//#include <Timezone.h>
unsigned long wait=0UL;
void setup(){
Serial.begin(115200);
Serial.println("\nTime Example");
setTime(23,55,0,8,8,2015); // setTime(hh,mm,ss,dd,mm,yyyy)
}
void loop(){
if(millis()>wait){
Serial.print((String)day()+"-"+(String)month()+"-"+(String)year()+" ");
Serial.println((String)hour()+":"+(String)minute()+":"+(String)second());
wait=millis()+1000UL;
}
}