You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by mgrum on 24 Jul 2013 11:41 UTC as Trac ticket #1489261
When detecting the client timezone, the Javascript sometimes send a numerical time offset (i.e. the difference to UTC) instead of a string containing the timezone name. When Roundcube sees these numerical values (coming either directly from the Javascript or from the database), it uses the PHP function timezone_name_from_abbr to get the timezone names (in rcube_config.php).
This function however doesn't work for some specific offsets, simply because they are not present in the functions built-in conversion table. This is a known PHP bug and has been reported at [https://bugs.php.net/bug.php?id=44780]. It is still not fixed, after more than five years, so we probably can't expect it to be fixed anytime soon.
Roundcube seemingly tries to work around this bug by ignoring exceptions and falling back to the server timezone (since commit 086b153), but that is obviously not always the correct timezone for the user.
A proper workaround would be to throw out timezone_name_from_abbr and use an own conversion table, which is more complete than the built-in one. The data for such a table was posted in the PHP bug report comments by mfburdett.
Since we use jsTimezoneDetect numeric timezone shouldn't be returned from javascript in all browsers except IE6. So, maybe we shouldn't care. Or this is jsTimezoneDetect bug?[[BR]]
As for the timezone_name_from_abbr() bug http://php.net/manual/en/function.timezone-name-from-abbr.php#86928 gives another solution.
I looked further into this and I don't think that there is a jsTimezoneDetect bug involved here. As far as I can tell, the Javascript really only sends numeric values if it runs in IE6 (which I can understand if you don't care for).
I think the real problem is that after an upgrade from a previous version of Roundcube, that did not use jsTimezoneDetect, there are many useres who have numeric timezone values stored in the database. And those users will be affected by the timezone_name_from_abbr bug every time the timezone setting is read from the database.
A possible fix for that is writing a separate script that changes these values directly in the database (which is what we did).
Reported by mgrum on 24 Jul 2013 11:41 UTC as Trac ticket #1489261
When detecting the client timezone, the Javascript sometimes send a numerical time offset (i.e. the difference to UTC) instead of a string containing the timezone name. When Roundcube sees these numerical values (coming either directly from the Javascript or from the database), it uses the PHP function timezone_name_from_abbr to get the timezone names (in rcube_config.php).
This function however doesn't work for some specific offsets, simply because they are not present in the functions built-in conversion table. This is a known PHP bug and has been reported at [https://bugs.php.net/bug.php?id=44780]. It is still not fixed, after more than five years, so we probably can't expect it to be fixed anytime soon.
Roundcube seemingly tries to work around this bug by ignoring exceptions and falling back to the server timezone (since commit 086b153), but that is obviously not always the correct timezone for the user.
A proper workaround would be to throw out timezone_name_from_abbr and use an own conversion table, which is more complete than the built-in one. The data for such a table was posted in the PHP bug report comments by mfburdett.
Migrated-From: http://trac.roundcube.net/ticket/1489261
The text was updated successfully, but these errors were encountered: