mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Allow adding spots. Convert timestamps in the API to UNIX seconds. #2
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user