mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
lcd4l/weather: fix creation of data files for first run
Origin commit data
------------------
Branch: ni/coolstream
Commit: ae4338d710
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-03-20 (Wed, 20 Mar 2019)
Origin message was:
------------------
- lcd4l/weather: fix creation of data files for first run
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -79,10 +79,10 @@ void CWeather::setCoords(std::string new_coords, std::string new_city)
|
||||
}
|
||||
}
|
||||
|
||||
bool CWeather::checkUpdate()
|
||||
bool CWeather::checkUpdate(bool forceUpdate)
|
||||
{
|
||||
time_t current_time = time(NULL);
|
||||
if (difftime(current_time,last_time) > MINUTES)
|
||||
if (forceUpdate || (difftime(current_time,last_time) > MINUTES))
|
||||
return GetWeatherDetails();
|
||||
else
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user