Thursday, March 9, 2017

Timezone and time not synchronized on client pc

I have created an application that depends on the timezone (set on the OS) of the client to render a display.

However, if the client incorrectly set his timezone on his pc, my display breaks.

My question is: How to i get the appropriate timezone of the client, based on where he is right now?

I understood that there are a couple of solutions: I could do this by using google API and then know the location of the client.However, this would require asking the client permission before accessing his location. I also read that you could use IP address of the client but this is unreliable. Finally, I could just ask the client.

Is there any other way to do this dynamically? Any help is appreciated

PS: I understand that the question is broad and my question would simply require a list of possibilities. No definite answer.



via mushood badulla

Advertisement