That's why I asked..
What are you using?
You need to know the current time, although you say you don't..
You could either get the system date/time with the plugin by rex, or maybe retrieve it from a website using Ajax somehow..
I guess you should have a look at the plugin in the plugin section of this forum..