Allow adding spots. Convert timestamps in the API to UNIX seconds. #2

This commit is contained in:
Ian Renton
2025-10-04 13:28:22 +01:00
parent 0419aab83f
commit 5f16abf709
16 changed files with 51 additions and 37 deletions

View File

@@ -36,7 +36,7 @@ class GMA(HTTPProvider):
sig_refs=[source_spot["REF"]],
sig_refs_names=[source_spot["NAME"]],
time=datetime.strptime(source_spot["DATE"] + source_spot["TIME"], "%Y%m%d%H%M").replace(
tzinfo=pytz.UTC),
tzinfo=pytz.UTC).timestamp(),
latitude=float(source_spot["LAT"]) if (source_spot["LAT"] != "") else None,
# Seen GMA spots with no lat/lon
longitude=float(source_spot["LON"]) if (source_spot["LON"] != "") else None)