2

I am trying to get time from the device but it returns incorrect time if I change my timezone (Because of the timezone). Is there any way to fetch timezone from the internet so that If a user changes its device timezone it should show the actual real time.

BTW I am using the true time library to get real UTC time.

1 Answer 1

6

You can use a publicly available API for this. I use http://ip-api.com/json go thorugh documention before implementation. However if you want you can use other APIs. As I am sure there are many.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.