mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
Set the default timezone as early as possible
This commit is contained in:
parent
ae3ab3b897
commit
66d8cbfae7
2 changed files with 7 additions and 5 deletions
|
|
@ -517,10 +517,6 @@ class Context
|
||||||
// Save old format to Context instance.
|
// Save old format to Context instance.
|
||||||
self::$_instance->allow_rewrite = $config['use_rewrite'];
|
self::$_instance->allow_rewrite = $config['use_rewrite'];
|
||||||
self::$_instance->db_info = $db_info;
|
self::$_instance->db_info = $db_info;
|
||||||
|
|
||||||
// Set the internal timezone.
|
|
||||||
$internal_timezone = Rhymix\Framework\DateTime::getTimezoneNameByOffset($config['locale']['internal_timezone']);
|
|
||||||
date_default_timezone_set($internal_timezone);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE ^ E_STRICT ^ E_DEPRECATED);
|
error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE ^ E_STRICT ^ E_DEPRECATED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the default timezone.
|
* Suppress date/time errors until the internal time zone is set (see below).
|
||||||
*/
|
*/
|
||||||
date_default_timezone_set(@date_default_timezone_get());
|
date_default_timezone_set(@date_default_timezone_get());
|
||||||
|
|
||||||
|
|
@ -197,3 +197,9 @@ require_once RX_BASEDIR . 'vendor/autoload.php';
|
||||||
* Load system configuration.
|
* Load system configuration.
|
||||||
*/
|
*/
|
||||||
Rhymix\Framework\Config::init();
|
Rhymix\Framework\Config::init();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the internal timezone.
|
||||||
|
*/
|
||||||
|
$internal_timezone = Rhymix\Framework\DateTime::getTimezoneNameByOffset(config('locale.internal_timezone'));
|
||||||
|
date_default_timezone_set($internal_timezone);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue