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


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

The time zone has recently changed, and the clocks are also switched to 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 set 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, is there any single correct solution in this situation?

(android: I know how to use Jsoup, parsed 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 city coordinates are easy to get by name.

Here is the documentation:

Pay attention to the dstOffset and rawOffset parameters.

Scroll to Top