From c36429f3df2729493f2197682c125d64a3d2214a Mon Sep 17 00:00:00 2001 From: Alban Bronisz Date: Wed, 7 Apr 2021 19:39:38 +0200 Subject: [PATCH] Minor fixes --- display/render.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/display/render.py b/display/render.py index 2c7512e..d653c66 100644 --- a/display/render.py +++ b/display/render.py @@ -59,12 +59,13 @@ def load_data(stats_fn: str): for t_i, stat in enumerate(data): for field in stat: if field == "date": # date - date_ = stat[field].replace("+01:00", "+0000") + date_ = stat[field].replace("+01:00", "+0000").replace("+02:00", "+0200") data_dict[field][t_i] = datetime.strptime(date_, "%Y-%m-%dT%H:%M:%S%z") else: # float value = stat[field].split(" ")[0] value = value.replace("MiB", "e3") value = value.replace("GiB", "e6") + value = value.replace("B", "") data_dict[name_from_field(field)][t_i] += float(value) / 1000 # values are in MiB return data_dict