I have a simple site under development where users can question & answer. The problem that I face is that there are users from many timezones across the globe who might be posting where their respective time will be displayed as well.Someone is posting from Asia/Calcutta,someone else from America/Phoenix and some other from Europe/London etc etc. For example, I have set the default timezone:
date_default_timezone_set('Asia/Calcutta');
People from that timezone will see the exact time.But for the people from America/Phoenix or Europe/London I have to set :
date_default_timezone_set('America/Phoenix');
or
date_default_timezone_set('Europe/London');
But all this is in a static way that I use only to explain. In real scenario how do I accomplish this task as I don't know which user from which timezone is posting.So setting timezone to specific timezones will be useless in this case. How do I resolve it dynamically or any other means of doing this?