mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +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.
|
||||
self::$_instance->allow_rewrite = $config['use_rewrite'];
|
||||
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);
|
||||
|
||||
/**
|
||||
* 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());
|
||||
|
||||
|
|
@ -197,3 +197,9 @@ require_once RX_BASEDIR . 'vendor/autoload.php';
|
|||
* Load system configuration.
|
||||
*/
|
||||
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