Page 1 of 1

Displaying the post time on the news 2.0 module

Posted: Mon Jan 09, 2006 12:32 am
by steve
Hi all,

Im trying to display the post time as well as the post date on entries on the news module. From other posts it looks like i adjust the {$entry->formatpostdate} but i can't work out how to do this.

Also, I would like to set the news module to be my local time. I'm working in London, England but the site is hosted someplace in California which i think is why it's always several hours behind as it's using the locale of the server as the time reference. Is there a way i can change it to be london time?

Here's the page it's on if it helps:
http://www.timpope.tv/snews.html

Any help appreciated

Thanks

Re: Displaying the post time on the news 2.0 module

Posted: Mon Jan 09, 2006 12:57 pm
by westis
Hi steve,

The date and time is using the PHP strftime function.

In the tag where you call the News module on your page or in your template, use the date_format parameter, like this:

{cms_module module='news' dateformat='%B %e, %Y %I:%M%p' }

The above would give the output like January 9, 2006 1:54pm.

Hope that helps. :D

Re: Displaying the post time on the news 2.0 module

Posted: Sun Jan 29, 2006 10:53 pm
by steve
that's great Patricia,
I look forward to the tweek!
Steve