Roundcube Community Forum

 

Timezone - _REQUEST[timezone] is 0

Started by jpm, May 04, 2009, 07:37:17 PM

Previous topic - Next topic

jpm

The timezone, when set to auto, is not correctly detected.  In program/include/rcmail.php, it sets the session variable as:
$_SESSION['timezone'] = floatval($_REQUEST['_timezone']);
But, when outputting the $_REQUEST['_timezone'] variable, it is zero (or empty).  (Where is it set?)

I have RC release date 2009/01/20 which was automatically setup in cPanel (I verified this is version 0.2.1, and it appears to be the same).

My work-around was to edit main.inc (in program/include/) and edit line ~739 to have $tz=date('Z')/3600 (thus ignoring the Session variable).

Has anyone else had this problem?  Why wouldn't the $_REQUEST['_timezone'] be properly set?

Thanks,
Jim.

JohnDoh

there is a hidden field in the login form which sets it to _default_, the code is in program/include/rcube_template.php. the only other place i think there is a _timezone field is on the settings page. check the field in the login form is correct. also if you can try the latest SVN just incase it has been fixed in trunk.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

jpm

Quote from: JohnDoh;18900there is a hidden field in the login form which sets it to _default_, the code is in program/include/rcube_template.php.

cPanel's WebMail page just seems to log directly into RC without displaying any further login, and I am suspecting that is the reason the variable is not being set.  Previously it seems that the way timezones were handled was not using a SESSION variable, etc, so I didn't see any tz issues until now (Jan 2009's release).  Maybe RC needs to add a chedk: "If TZ variable is empty or 0"... meaning that the login page was not used.

jpm

Anyone else have any input on this?  I find it hard to believe that I am the only cPanel user having this issue.  My work-around is working fine (until cPanel updates and overwrites it).  Perhaps I need to look in to installing RoundCube outside of cPanel.

Thanks.