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
Share on other sites

  • 3 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.