Jump to content

Date/Time in Joomla Template


jschendel

Recommended Posts

Hello - novice to php here...

 

I have a Joomla template which displays the date and time on my site. The date and time info evidently come from the server which is not in my time zone (I'm in CST, but the screen displays MST), so the hour is off by one.

 

The line where the date and time are in the template was:

<div id="date"><?php echo JHTML::Date( 'now', '%A, %d.%m.%Y' ); ?></div>

 

and I changed it to:

<div id="date"><?php echo JHTML::Date( 'now', '%A - %B %d, %Y %I:%M' ); ?></div>

 

What would be the best way for me to adjust the hour to show CST and not MST?

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/247225-datetime-in-joomla-template/
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.