0 votes
in WeatherStationClassic by (150 points)


i have error message by compiling

C:\Users\ocram\Documents\Arduino\libraries\esp8266-weather-station-master\src\TimeClient.cpp: In member function 'long int TimeClient::getCurrentEpochWithUtcOffset()':

C:\Users\ocram\Documents\Arduino\libraries\esp8266-weather-station-master\src\TimeClient.cpp:124:67: error: invalid operands of types 'double' and 'long int' to binary 'operator%'

 return round(getCurrentEpoch() + 3600 * myUtcOffset + 86400L) % 86400L;

i can't find the error in the TimeClient.cpp


1 Answer

0 votes
by (16.4k points)
Best answer
You must be using an older version of the library but a fairly recent version of ESP8266 Arduino Core.

A fix has been available in the library since version 1.6.5 from December 26th, 2018. See https://github.com/ThingPulse/esp8266-weather-station/commit/20441ecac1d390f06b9747d8ea30bfe19b98f428. Just upgrade to the latest 2.0.1.
by (150 points)
Big THX,

works fine :-)

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.