How to convert the UTC time according to viewer’s timezone?
I heard that it’s not possible to get the timezone of the viewer, but then how do social networking services like FB, twitter do this ?
Edit: I have registered users on my application.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is possible to get the user timezone, but this is done with javascript (get the detect_timezone.js). You most likely do that when users are registered.
Another, worse way is to approximate the timezone based on the IP
and finally (with combination of any of the above), you can give the user a choice to select his timezone in his settings