Index: branches/RC/core/kernel/application.php =================================================================== diff -u -N -r9389 -r9639 --- branches/RC/core/kernel/application.php (.../application.php) (revision 9389) +++ branches/RC/core/kernel/application.php (.../application.php) (revision 9639) @@ -288,6 +288,9 @@ $this->SetVar('visits_id', $this->RecallVar('visit_id') ); $language =& $this->recallObject( 'lang.current', null, Array('live_table' => true) ); + if (preg_match('/utf-8/', $language->GetDBField('Charset'))) { + setlocale(LC_ALL, 'en_US.UTF-8'); + } $this->ValidateLogin(); @@ -780,6 +783,7 @@ */ function Done() { + $this->HandleEvent( new kEvent('adm:OnBeforeShutdown') ); if ($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) { $this->Debugger->appendMemoryUsage('Application before Done:'); } @@ -1628,6 +1632,7 @@ $session =& $this->Application->recallObject('Session'); /* @var $session Session */ + $this->HandleEvent( new kEvent('adm:OnBeforeShutdown') ); $session->SaveData(); exit; } @@ -2424,6 +2429,9 @@ function TimeZoneAdjustment($time_zone = null) { + if ($time_zone == 'GMT') { + return (-1) * adodb_date('Z'); + } $target_zone = isset($time_zone) ? $time_zone : $this->ConfigValue('Config_Site_Time'); return 3600 * ($target_zone - $this->ConfigValue('Config_Server_Time')); }