I am doing a website where I collect the time and date from the users when they create an event...once they create it, I want to show something like this in http://www.groupon.com/washington-dc/ (check time left to buy). i there any direct way in php/mysql. also how to handle the time zone? if a person from california is seeing the event , he/she shouldn't see the same "time left" like NY users...how to handle this?
regards
I'm used to always storing date/time in database in UTC timezone. Later you can convert it to user's time zone by php(based on user's location if you store it somewhere) or on client-side using javascript(using client's machine timezone).
You can definitely create a static countdown time using PHP and MySQL, but in order to count down the hours, minutes, and seconds, I think your best option is going to be to use JavaScript.
In order to handle the time zones, I think what you could do is store the event's time in the same timezone for each user, regardless of where they are. For example, to set each user's time zone as UTC, use the following:
<?php date_default_timezone_set('UTC'); ?>