Microservice Recipe: GEO Coordinates to Timezone

Service Recipes > GEO Coordinates to Timezone
15 Apr 2018

GEO Coordinates to Timezone

This microservice recipe provides a simple example of how to lookup a timezone based on GEO latitude and longitude coordinates. The Eventplatform uses the geo-tz NPM package by Evan Siroky.

ExampleGETFunction

Description

Return a timezone for given latitude and longitude coordinates.

Parameters

latSTRING, REQUIRED - latitude
lngSTRING, REQUIRED - longitude

Code

Example Request

curl -H "Content-Type: application/json" \
-H "Authorization: Bearer {SERVICE_TOKEN}" \
https://service.eventn.com/{SERVICE_NAME}?lat=37.773972&lng=-122.431297

Example Response

{ "status": "success", "data": "America/Los_Angeles" }

Get Started For Free

Get Started