- Time Management -
Moderators: egami, macek, gesf
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.
JCCorner.com - Online marketplace including online mall, link trading post, web articles and community board.
-
- New php-forum User
- Posts: 193
- Joined: Sat Mar 29, 2003 11:57 pm
- Location: Auckland, New Zealand
- Contact:
To get the current hour do this.
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.
Code: Select all
$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)
you will then need to calculate your time offset
EST this is (60*60)*(-5)