diff --git a/api/js/framework/fw_base.js b/api/js/framework/fw_base.js index d603fb2f07..cea5a6c83a 100644 --- a/api/js/framework/fw_base.js +++ b/api/js/framework/fw_base.js @@ -857,12 +857,16 @@ var fw_base = (function(){ "use strict"; return Class.extend( tzSelection: function(_tz) { //Perform an AJAX request to tell server - var req = egw.json('EGroupware\Api\Framework\Ajax::ajax_tz_selection',[_tz],null,null,false); // false = synchron + var req = egw.json('EGroupware\\Api\\Framework\\Ajax::ajax_tz_selection',[_tz],null,null,false); // false = synchron req.sendRequest(); - if (this.activeApp.browser) + // Reload apps so they can use the new setting + for (var app in this.applications) { - this.activeApp.browser.reload(); + if (this.applications[app].browser) + { + this.applications[app].browser.reload(); + } } }, diff --git a/api/src/Egw.php b/api/src/Egw.php index 3c91308ff3..bfbb4fb689 100644 --- a/api/src/Egw.php +++ b/api/src/Egw.php @@ -234,8 +234,6 @@ class Egw extends Egw\Base // init the translation class, necessary as own wakeup would run before our's Translation::init(isset($GLOBALS['egw_info']['flags']['load_translations']) ? $GLOBALS['egw_info']['flags']['load_translations'] : true); - $this->unset_datetime(); - // verify the session $GLOBALS['egw']->verify_session(); $GLOBALS['egw']->check_app_rights(); @@ -243,14 +241,6 @@ class Egw extends Egw\Base $this->load_optional_classes(); } - /** - * Unsetting datetime object, so time gets updated - */ - function unset_datetime() - { - unset($this->datetime); - } - /** * load optional classes by mentioning them in egw_info[flags][enable_CLASS_class] => true * diff --git a/api/src/Preferences.php b/api/src/Preferences.php index 81585d556f..ecc6fe2e06 100644 --- a/api/src/Preferences.php +++ b/api/src/Preferences.php @@ -521,20 +521,13 @@ class Preferences */ function check_set_tz_offset() { - $prefs =& $GLOBALS['egw_info']['user']['preferences']['common']; + $prefs =& $this->data['common']; if (!empty($prefs['tz'])) { DateTime::setUserPrefs($prefs['tz'],$prefs['dateformat'],$prefs['timeformat']); // set the old preference for compatibilty with old code $prefs['tz_offset'] = DateTime::tz_offset_s()/3600; - //echo "

".__METHOD__."() tz=$prefs[tz] --> tz_offset=$prefs[tz_offset]

\n"; - - // ToDo: get rid of that - if (isset($GLOBALS['egw']) && ($GLOBALS['egw'] instanceof egw)) - { - $GLOBALS['egw']->unset_datetime(); // to force an update - } } }