java – How to always get the correct time in a specific city (android / ios)?


I am writing an application for both platforms, in which it is vitally important to know the current exact time in a certain city, for example, Novosibirsk.

The time zone has recently changed, as well as the clock is set for winter and summer … In general, it is not always equal to GMT + 7. And you need to know exactly the correct time in the city, regardless of what is displayed on the user's device.

Are there any resources from which you can parse the exact time in a particular city or libraries with such a function …

In general, there is any single correct solution in this situation?

(android: I know how to use Jsoup, I parsed the time from , but the site is sometimes unavailable, which means this option is not suitable)

I would be grateful for any useful information!


I used google maps. Through the API, you can access the current time zone at the specified coordinates (including time translation). The coordinates of the city are easy to get from the name.

Here is the documentation:

Pay attention to the dstOffset and rawOffset parameters.

Scroll to Top