Carlos Llanos
asked on
Time is off by +5 hours on Joomla front end...but correct on backend.
Weird problem here.
Got a message saying that the website is displaying a time that's exactly 5 hours ahead of our current time, but when I check the administration side, it's the correct time.
For example:
Front side of site says: 14:00:00
Back side of site says: 09:00:00
Code for front side and back side is:
The timezone is set to 'America/Chicago' which is my timezone (CST), but I don't think it's working correctly...
This was working just find yesterday...and the only thing I changed was to enable Akeeba's Lazy Backup Plugin...disabled it now and still the same results.
Got a message saying that the website is displaying a time that's exactly 5 hours ahead of our current time, but when I check the administration side, it's the correct time.
For example:
Front side of site says: 14:00:00
Back side of site says: 09:00:00
Code for front side and back side is:
<?php
$date = date('H:i:s');
echo $date;
?>
The timezone is set to 'America/Chicago' which is my timezone (CST), but I don't think it's working correctly...
This was working just find yesterday...and the only thing I changed was to enable Akeeba's Lazy Backup Plugin...disabled it now and still the same results.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help, thanks for the points. You might also consider date_default_timezone_set( ), too.
http://php.net/manual/en/function.date-default-timezone-set.php
http://php.net/manual/en/function.date-default-timezone-set.php
ASKER
<?php return date("H")+01;?>
to
<?php return date("H")+1;?>
This worked like a charm...thanks Ray!