Reputation: 886
I'm working with https://developer.here.com services and I'm trying to get the timezone on reverse gecoding, like this:
https://reverse.geocoder.api.here.com/6.2/reversegeocode.json?prox=47.2094,8.6908%2C250&mode=retrieveAreas&maxresults=1&level=city&locationattributes=timeZone&gen=8&app_id={mymappid}&app_code={myappcode}
I got everything back I need, just no timezone. The response result with or without 'locationattributes=timeZone' doesn't differ. Is there anything I'm doing wrong based on the documentation at: https://developer.here.com/documentation/geocoder/topics/resource-reverse-geocode.html ?
Upvotes: 1
Views: 114
Reputation: 886
In between I've found the solution: Even tough 'timeZone' is accepted as parameter value and doesn't return anything I found out, that the parameter 'adminInfo' returns the timeZone as UTC abbreviation (and some more values):
Call: https://reverse.geocoder.api.here.com/6.2/reversegeocode.json?prox=47.2094,8.6908%2C250&mode=retrieveAreas&maxresults=1&level=city&locationattributes=adminInfo&gen=8&app_id={myappid}&app_code={myappcode}
Return: ... {"TimeZoneOffset":"UTC+02:00","LocalTime":"2018-05-01T15:23:03+0200", ...
Thats ok for my need.
Upvotes: 2