WorldTimeZones takes latitude and longitude coordinates and determines the time zone for the location.
Resource URL
JSON endpoint:
https://OnDemandServer/rest/WorldTimeZones/results.json
XML endpoint:
https://OnDemandServer/rest/WorldTimeZones/results.xml
For a list of Spectrum OnDemand servers, see Connecting to Spectrum OnDemand Servers.
Example with JSON Response
The following example requests a JSON response:
https://spectrum.precisely.com/rest/WorldTimeZones/results.json?Data.Longitude=-88.3278267&Data.Latitude=41.857464
The JSON returned by this request would be:
{
"Output": [
{
"Country_Name": "United States",
"ISO_2": "US",
"Standard_Variation": -6.0,
"DST_Variation": -5.0,
"TZ_id": 398,
"Longitude": "-88.3278267",
"Latitude": "41.857464",
"TimeZones.ZoneName": "America/Chicago",
"TimeZones.TimeZone_Code": "CST/CDT",
"TimeZones.TimeZone": "Central Time (CST/CDT)",
"user_fields": []
}
]
}
Example with XML Response
The following example requests an XML response:
https://spectrum.precisely.com/rest/WorldTimeZones/results.xml?Data.Longitude=-88.3278267&Data.Latitude=41.857464
The XML returned by this request would be:
<xml.WorldTimeZonesResponse xmlns="http://www.pb.com/spectrum/services/WorldTimeZones">
<Output>
<Row>
<Country_Name>United States</Country_Name>
<ISO_2>US</ISO_2>
<Standard_Variation>-6.0</Standard_Variation>
<DST_Variation>-5.0</DST_Variation>
<TZ_id>276</TZ_id>
<Longitude>-88.3278267</Longitude>
<Latitude>41.857464</Latitude>
<user_fields/>
</Row>
</Output>
</xml.WorldTimeZonesResponse>