View Full Version : Current time variable?

24 Jul 2005, 09:30
Anyone know what phrase or variable I can use in a template to display the current time to a user? The vbphrase[all_times_are-gmt..blah,blah] won't work. I just want to display only the time.


Adrian Schneider
24 Jul 2005, 09:58
All I could find is the constant TIMENOW which is useless for what you want... You'll probably just have to add some php_include code
$timenow = vbdate($vboptions['timeformat'], TIMENOW);

24 Jul 2005, 10:06
Thanks Specialist, that worked. Not as easy as a phrase but just as good. :)

I appreciate it.

24 Jul 2005, 15:08
I have been using this in my navbar template for a while. It still works in 3.5. :)

<phrase 1="$timenow">$vbphrase[time_is_now_y]</phrase>

Phrase is:

The time now is <span class="time">{1}</span>