From 3fa0a3a9189835b5fd88081b4b43596f5d67e7ec Mon Sep 17 00:00:00 2001 From: Someone Date: Tue, 27 Dec 2022 00:44:09 +0100 Subject: [PATCH] added wind_dir_degree (22.5 degree precision) and fixed timestamp to be in utc. --- fetch_data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch_data.py b/fetch_data.py index 0e3d591..e862b2c 100755 --- a/fetch_data.py +++ b/fetch_data.py @@ -137,8 +137,9 @@ def main(): print('"wind_speed": "%2.1f",' %wind_speed) print('"gust_speed": "%2.1f",' %gust_speed) if wind_dir != 128: + print('"wind_dir_deg": "%s",' %(wind_dir*22.5)) print('"wind_dir": "%s",' %WIND_DIRS[wind_dir]) - print('"TS": "%s"' %(datetime.datetime.now().isoformat())) + print('"TS": "%s"' %(datetime.datetime.utcnow().isoformat())) print('}') -- 2.43.0