Time is off by +5 hours on Joomla front end...but correct on backend.

Posted on 2011-10-13
Last Modified: 2013-12-25
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:

$date = date('H:i:s');

echo $date;


Open in new window

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.
Question by:NUKIT
    LVL 107

    Accepted Solution

    Check out this article about time and localization.  I am sure you will find the answer!
    LVL 13

    Author Closing Comment

    Changed my scripts from:

    <?php return date("H")+01;?>


    <?php return date("H")+1;?>

    This worked like a charm...thanks Ray!
    LVL 107

    Expert Comment

    by:Ray Paseur
    Glad to help, thanks for the points.  You might also consider date_default_timezone_set(), too.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now