Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
date function displays the wrong time
#1
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
Reply




Users browsing this thread: 1 Guest(s)