Forum Support

Shape 5
March 28, 2024, 09:36:44 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Change date to +15 hours  (Read 395 times)
magnascan
Jr. Member
**
Offline Offline

Posts: 4



« on: July 01, 2009, 11:17:17 PM »

Hi,

My display date at the top of the page seems to be 15 hours behind (location Australia) Can someone tell me what I have to change to get the time display accurate. I have set the Joomla time to my zone but no joy.
Cheers

Steve
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #1 on: July 02, 2009, 07:13:22 AM »

Hi  Steve, I am not sure how you would do that, it pulls off of your server time. You can view the following to see if there is any information here:

http://php.net/manual/en/function.date.php
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
magnascan
Jr. Member
**
Offline Offline

Posts: 4



« Reply #2 on: July 02, 2009, 04:13:38 PM »

Hi Mike

I have several templates installed from your competition Yootheme and they all display the correct time without any intervention from me. I am not a coder. How come Yootheme templates display time correctly and your don't? I can only assume they get the time from the Joomla global setting which has my local time set. Once again, how do I do this?
Cheers

Steve
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #3 on: July 03, 2009, 07:01:37 PM »

If you edit your template's index.php file and at line 229 you will find:

<?php $today = date("l, F j, Y"); PRINT "$today";?>

Change that to:

<?php
date_default_timezone_set('Australia/Sydney');
$today = date("D M j G:i:s T Y");
PRINT "$today";
?>

You'll see I set the time zone to Australia/Sydney, if that needs changed here is a list of available php time zone variables for Australia:

http://us3.php.net/manual/en/timezones.australia.php
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.