GetSimple Support Forum

Full Version: date function displays the wrong time
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In my case the function is returning a extra hour. instead of 13 it returns 14.

If I use on the index.php it displays fine
when I use on the template.php it gives me an extra hour.

I have get simple 3 installed and it does that on both themes cardinal and innovatiom.

I tried changing my timezone but that did not help. All timezones returned the same value.


So I went to the common.php and commented out the timezone section and it "fixed" the problem.
I would like to learn how to really fix this issue if possible.

here is the code

Code:
if( function_exists('date_default_timezone_set') && ($TIMEZONE != '' || stripos($TIMEZONE, '--')) ) {
    date_default_timezone_set($TIMEZONE);
}

edit:

I did some more research and my timezone is set to New York. I guess the problem could be in the admin part that sets the timezone