: Change date to +15 hours : magnascan 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 : Re: Change date to +15 hours : mikek 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 : Re: Change date to +15 hours : magnascan 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 : Re: Change date to +15 hours : mikek 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 |