I fixed.
Find in lib/pkp/classes/i18n/PKPLocale.inc.php;
static function initialize($request) {
self::$request = $request;
// Use defaults if locale info unspecified.
$locale = AppLocale::getLocale();
setlocale(LC_ALL, $locale . '.' . LOCALE_ENCODING, $locale);
putenv("LC_ALL=$locale");
AppLocale::registerLocaleFile($locale, "lib/pkp/locale/$locale/common.po");
// Set site time zone
// Starting from PHP 5.3.0 PHP will throw an E_WARNING if the default
// time zone is not set and date/time functions are used
// http://pl.php.net/manual/en/function.date-default-timezone-set.php
$timeZone = self::getTimeZone();
date_default_timezone_set($timeZone);
if (Config::getVar('general', 'installed')) {
// Set the time zone for DB
// Get the offset from UTC
$now = new DateTime();
$mins = $now->getOffset() / 60;
$sgn = ($mins < 0 ? -1 : 1);
$mins = abs($mins);
$hrs = floor($mins / 60);
$mins -= $hrs * 60;
$offset = sprintf('%+d:%02d', $hrs*$sgn, $mins);
switch(Config::getVar('database', 'driver')) {
case 'mysql':
case 'mysqli':
Capsule::statement('SET time_zone = \''.$offset.'\'');
break;
case 'postgres':
case 'postgres64':
case 'postgres7':
case 'postgres8':
case 'postgres9':
Capsule::statement('SET TIME ZONE INTERVAL \''.$offset.'\' HOUR TO MINUTE');
break;
default: assert(false);
}
}
}
change with below;
static function initialize($request) {
self::$request = $request;
// Use defaults if locale info unspecified.
$locale = AppLocale::getLocale();
setlocale(LC_ALL, $locale . '.' . LOCALE_ENCODING, $locale);
putenv("LC_ALL=$locale");
AppLocale::registerLocaleFile($locale, "lib/pkp/locale/$locale/common.po");
// Set site time zone
// Starting from PHP 5.3.0 PHP will throw an E_WARNING if the default
// time zone is not set and date/time functions are used
// http://pl.php.net/manual/en/function.date-default-timezone-set.php
$timeZone = self::getTimeZone();
date_default_timezone_set($timeZone);
if (Config::getVar('general', 'installed')) {
// Set the time zone for DB
// Get the offset from UTC
$now = new DateTime();
$mins = $now->getOffset() / 60;
$sgn = ($mins < 0 ? -1 : 1);
$mins = abs($mins);
$hrs = floor($mins / 60);
$mins -= $hrs * 60;
$offset = sprintf('%+d:%02d', $hrs*$sgn, $mins);
switch(Config::getVar('database', 'driver')) {
case 'mysql':
case 'mysqli':
Capsule::statement('SET time_zone = \''.$offset.'\'');
break;
case 'postgres':
case 'postgres64':
case 'postgres7':
case 'postgres8':
case 'postgres9':
Capsule::statement('SET TIME ZONE INTERVAL \''.$offset.'\' HOUR TO MINUTE');
break;
default: assert(false);
}
}
if ($locale == 'tr_TR') setlocale(LC_CTYPE, 'en_US');
}