Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetSimple 3.1 Beta Cut r506 (July 1, 2011)
#36
Hi there.

found problem with timezone settings. Basically it gets loaded for the user when logged in. But otherwise not.
This can make your dates on web (of for some reason you have date time on server dynamically) wrong.

Basically this part in common.pas

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

only executes when user is logged in otherwise not.

thanks to this logic that only does it on login.

Code:
/** grab user data */
if (isset($_COOKIE['GS_ADMIN_USERNAME'])) {
    $cookie_user_id = _id($_COOKIE['GS_ADMIN_USERNAME']);
    if (file_exists(GSUSERSPATH . $cookie_user_id.'.xml')) {
        $datau = getXML(GSUSERSPATH  . $cookie_user_id.'.xml');
        $USR = stripslashes($datau->USR);
        $HTMLEDITOR = $datau->HTMLEDITOR;
        $TIMEZONE = (string)$datau->TIMEZONE;
        $LANG = $datau->LANG;
    } else {
        $USR = null;
        $TIMEZONE = "";    
    }
} else {
    $USR = null;
    $TIMEZONE = "";
}

Basically cant the timezone be saved against the website.xml file ? If user logs in, he can override his timezone session settings, but then there is a systemwide timezone that applies.

Reason is I see this on templates when trying to display footer.php (of the Innovation theme)

thanks

Johannes
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply


Messages In This Thread
GetSimple 3.1 Beta Cut r506 (July 1, 2011) - by dominionit - 2011-07-18, 06:54:46



Users browsing this thread: 1 Guest(s)