Page 1 of 1
Is it possible to show the time and date
Posted: Thu Jan 18, 2007 5:05 am
by nauticalwebd
I know with standard website design you can use SSI to show the server time and date on your website. Is there a way to do this through CMS? So far everything i've tried has failed.
Re: Is it possible to show the time and date
Posted: Thu Jan 18, 2007 5:41 am
by cyberman
Please look at Extensions > Tags in admin panel. There's a tag named current_date which can do what you want

.
Re: Is it possible to show the time and date
Posted: Thu Jan 18, 2007 2:28 pm
by calguy1000
Also, the CustomContent module can be used for this. It can also be used to display different content based on the time and date. The list of variables that CustomContent exports is now greatly expanded, and should be very useful for you.
Re: Is it possible to show the time and date
Posted: Sat Jan 20, 2007 2:30 am
by nauticalwebd
both work great, but i didn't realize till now that my server is in a different timezone than i'm wanting displayed on my website. Is there some way to modify this to move the time up 1 hour for my time zone?
Re: Is it possible to show the time and date
Posted: Sat Jan 20, 2007 8:45 am
by cyberman
Have you tried to call date_default_timezone_set() in index.php?
http://www.dynamicwebpages.de/php/funct ... ne-set.php
Re: Is it possible to show the time and date
Posted: Mon Jan 22, 2007 11:20 pm
by nauticalwebd
I have tried this but have been un-successfull. Where would the code go? I'm not too familiar with php so i'll strugle a little bit. Here is what I have tried putting into the index.php file. Either I received (Call to undefined function: date_default_timezone_set()) or the page pulled up fine but the time did not change.
echo(date_default_timezone_set("Europe/Paris"));
Re: Is it possible to show the time and date
Posted: Tue Jan 23, 2007 7:18 am
by alby
nauticalwebd wrote:
I have tried this but have been un-successfull. Where would the code go? I'm not too familiar with php so i'll strugle a little bit. Here is what I have tried putting into the index.php file. Either I received (Call to undefined function: date_default_timezone_set()) or the page pulled up fine but the time did not change.
echo(date_default_timezone_set("Europe/Paris"));
date-default-timezone-set is valid for php >= 5.1 version
Top for User Contributed Notes in
date function there is a useful function
Alby