Displaying the post time on the news 2.0 module

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
steve
Forum Members
Forum Members
Posts: 70
Joined: Mon Apr 11, 2005 12:31 pm

Displaying the post time on the news 2.0 module

Post 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
westis

Re: Displaying the post time on the news 2.0 module

Post 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
steve
Forum Members
Forum Members
Posts: 70
Joined: Mon Apr 11, 2005 12:31 pm

Re: Displaying the post time on the news 2.0 module

Post by steve »

that's great Patricia,
I look forward to the tweek!
Steve
Post Reply

Return to “CMSMS Core”