Revize c0dffb79
Přidáno uživatelem Alex Konig před více než 3 roky(ů)
Server/ServerApp/Parser/Parsers/JsonParser.cs | ||
---|---|---|
128 | 128 |
// change prediction |
129 | 129 |
for (int i = 0; i < predictions.Count - 1; i++) |
130 | 130 |
{ |
131 |
// TODO what about when days change -> detect end / start of day and do differently ? |
|
132 |
|
|
133 | 131 |
WeatherInfo w = predictions[i]; |
134 | 132 |
WeatherInfo wNext = predictions[i + 1]; |
135 | 133 |
|
134 |
// if wNext time < than w time then it is prediction from the next day -> add 24 to correctly calculate timespan |
|
136 | 135 |
int timespan = wNext.startTime.Hour - w.startTime.Hour; |
136 |
if (wNext.startTime.Hour < w.startTime.Hour) |
|
137 |
timespan = (wNext.startTime.Hour+24) - w.startTime.Hour; |
|
138 |
|
|
137 | 139 |
w.intervalLength = timespan; |
138 | 140 |
|
139 | 141 |
// if start under sunset |
Také k dispozici: Unified diff
re #8840 Fixing day changes in list of predictions