- Time Management -

A

Anonymous

Guest
Your best bet is to grab the system timestamp and then compare for each value. Try hotscripts.com to find a script that has already been written.
 
To get the current hour do this.

Code:
$currhour = date("H", time());

Then with your pull down menu have a switch statement deciding which choice to use. Remember, the hour will be the servers hour rather than the users timezones hour.
 
if you are unsure what timezone your server is in you can use gmdate('H', time()) which always outputs GMT

you will then need to calculate your time offset

EST this is (60*60)*(-5)
 
Back
Top