ex_google v0.2.0 ExGoogle.Timezone.Api View Source

API wrapper for google timezone

Link to this section Summary

Functions

Use google timezone api to find the timezone of the lat/long submitted

Link to this section Functions

Link to this function

search(params)

View Source
search(map()) :: {:ok, binary()} | {:error, binary()}

Use google timezone api to find the timezone of the lat/long submitted

Required parameters:

  • location: comma separated string of latitude and longitude
  • timestamp: time in seconds since Jan 1st, 1970 UTC to use as reference for taking into account any time shifts such as daylight savings time.

Optional parameters:

Examples

alias ExGoogle.Timezone.Api, as: Timezone
# get timezone for location
Timezone.search(%{location: "40.714224,-73.961452", timestamp: 1513964317})

# Advanced parameters
Timezone.search(%{location: "40.714224,-73.961452", timestamp: 1513964317, language: "tl"})