[eluser]codelearn[/eluser]
Hey guys,
I'm working on building a script which will be able to tell you whether or not a restaraunt is open or closed depending on the time.
I've got a database which is storing the time the restaurant is open like so:
Quote:Field open_mon is the time the restaurant opens (opens at value of 500 would mean 5:00, 730 would mean 7:30, etc. Field close_mon is the same way. I have a open_mon_ap field which tells me if it opens in the AM or PM and the same for closing.
The question is, how do I use that information to see if the restaurant is currently open. The timezone conversion is pretty easy using CI's date helper... but I don't know how to get those open/close times into UNIX format.
Any ideas? Thanks!!