glcd/weather: use next day after 4pm; align display to lcd4linux

Origin commit data
------------------
Branch: ni/coolstream
Commit: 8fee8bd7c7
Author: vanhofen <vanhofen@gmx.de>
Date: 2024-01-08 (Mon, 08 Jan 2024)

Origin message was:
------------------
- glcd/weather: use next day after 4pm; align display to lcd4linux

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2024-01-08 21:45:58 +01:00
parent 6c2485a752
commit b9361f5e65

View File

@@ -105,7 +105,11 @@ void RenderWeather(bool standby)
y = t.glcd_standby_weather_y_position; y = t.glcd_standby_weather_y_position;
} }
int forecast = 0; // 0 is current day time_t _n = time(NULL);
struct tm *_t;
_t = localtime(&_n);
int forecast = _t->tm_hour < 16 ? 0 : 1; // 0 is current day; after 4pm use next day
std::string current_wcity = ""; std::string current_wcity = "";
std::string current_wtimestamp = ""; std::string current_wtimestamp = "";