Commit 9d056d7c authored by Martin Vítek's avatar Martin Vítek
Browse files

Fixed selecting range of data

parent f87f4557
......@@ -7,10 +7,10 @@ import datetime
from astral import Astral
def calculate_observation(time_from):
if time_from[2] == current_time[2]:
data_start = current_time[3] - forecast_time[3]; # There will be problem after passing midnight
else:
data_start = current_time[3] - forecast_time[3] + 24;
if time_from[2] == current_time[2]: # same day
data_start = time_from[3] - forecast_time[3]; # There will be problem after passing midnight
else: # next day
data_start = time_from[3] - forecast_time[3] + 24;
clouds_total = 0
clouds_medium = 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment