I have a php script which gives server time, but as per knowledge, we can get the user's machine time and time zone with the help of client side scripts (javascript). I have mysql table which has dates stored along with timezone from where it was stored with the help of form. I need to show the data on a web page along with the time stored in the table, but it should be per user's machine.
rowid | date | timezone | data |
----------------------------------
12 | 2010-07-13 12:30:00 | Asia/Kolkata | This is data field |
143 | 2010-07-13 12:30:00 | Europe/Prague | This is data field |
Now, when I show date on web page, I need to show the above date per user's machine timezone.
A workaround logic would be that, if I could pass the date (2010-07-13 12:30:00) to some JS method which will take two time zone as input and convert the given date into user's machine's timezone. Or Something else?
Please help?