display current date and time in header

Bill Shaw - December 11, 2007 - 18:34

How would I go about displaying the current time and date in my site's header?

I haven't found any information on the topic.

Thank you.

try this another way...

Bill Shaw - December 13, 2007 - 19:52

Is there a way to have the current date and time posted on a page?

I am not too concerned which area of the page it needed to be, it would just be nice if the current date and time were included when a page on the site was downloaded.

Use PHP to display date and time

Drupalace - December 14, 2007 - 08:04

Any objection to doing it via PHP? A little Googling turns up any number of how-tos, like this simple one:
http://www.totallyphp.co.uk/code/display_date_and_time_with_php.htm

I just gave that one a shot on my site, and wrote up the process a bit, at http://www.drupalace.com/questions/how_display_date_and_time . No fancy options, just date and time, but is it on the right track for you?

--------
A site by, of, and for the Drupal newbie: http://www.drupalace.com

Thanks!

Bill Shaw - December 21, 2007 - 19:36

Works beautifully.

I shortened up the code to only display the date, until I fugre how to account for time zones. But until then, this gets me there ;)

Thanks!

Thanks!

Bill Shaw - December 21, 2007 - 19:36

Works beautifully.

Used the new block method from drupalace.com

I shortened up the code to only display the date, until I fugre how to account for time zones. But until then, this gets me there ;)

Thanks!

translate current date/time

vthirteen - January 6, 2008 - 09:53

what's the best way to get current date translated?

(i posted the same question here before finding this thread: http://drupal.org/node/206511 )

 
 

Drupal is a registered trademark of Dries Buytaert.