View Source TzWorld.Backend behaviour (TzWorld v1.4.1)
Defines the callbacks for the TzWorld.Backend behaviour
Summary
Callbacks
Returns all timezones at a specified point
Reloads the (potentially updated) timezone data
Returns the time zone at a specified point
Types
@type geo() :: Geo.Point.t()
A point
@type lat() :: -90..90
Latitude in degrees
@type lng() :: -180..180
Longitude in degrees
Callbacks
@callback all_timezones_at(Geo.Point.t()) :: {:ok, [String.t()]} | {:error, atom()}
Returns all timezones at a specified point
@callback reload_timezone_data() :: {:ok, term()}
Reloads the (potentially updated) timezone data
Returns the time zone at a specified point