Add timezone handling

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-10-10 16:25:50 +02:00
parent eba3c70c9b
commit d58ca5743d
49 changed files with 1218 additions and 429 deletions

View File

@@ -124,12 +124,15 @@ defmodule Mobilizon.Service.Geospatial.GoogleMaps do
description
end
coordinates = Provider.coordinates([lon, lat])
%Address{
country: Map.get(components, "country"),
locality: Map.get(components, "locality"),
region: Map.get(components, "administrative_area_level_1"),
description: description,
geom: [lon, lat] |> Provider.coordinates(),
geom: coordinates,
timezone: Provider.timezone(coordinates),
postal_code: Map.get(components, "postal_code"),
street: street_address(components),
origin_id: "gm:" <> to_string(place_id)