mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-27 05:59:08 +01:00
Set timezone before calling date
Summary: PhabricatorAccessLog called date() before we set the timezone; this reorders the commands. Test Plan: loaded my sandbox; checked log to see that hphp didn't complain Reviewers: epriestley, jungejason Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2911
This commit is contained in:
parent
bda5c670bc
commit
4cb4112686
1 changed files with 7 additions and 5 deletions
|
@ -78,6 +78,13 @@ try {
|
||||||
|
|
||||||
PhabricatorEnv::setEnvConfig($conf);
|
PhabricatorEnv::setEnvConfig($conf);
|
||||||
|
|
||||||
|
// This needs to be done before we create the log, because
|
||||||
|
// PhabricatorAccessLog::getLog() calls date()
|
||||||
|
$tz = PhabricatorEnv::getEnvConfig('phabricator.timezone');
|
||||||
|
if ($tz) {
|
||||||
|
date_default_timezone_set($tz);
|
||||||
|
}
|
||||||
|
|
||||||
// This is the earliest we can get away with this, we need env config first.
|
// This is the earliest we can get away with this, we need env config first.
|
||||||
PhabricatorAccessLog::init();
|
PhabricatorAccessLog::init();
|
||||||
$access_log = PhabricatorAccessLog::getLog();
|
$access_log = PhabricatorAccessLog::getLog();
|
||||||
|
@ -98,11 +105,6 @@ try {
|
||||||
phabricator_fatal("[Initialization Exception] ".$ex->getMessage());
|
phabricator_fatal("[Initialization Exception] ".$ex->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
$tz = PhabricatorEnv::getEnvConfig('phabricator.timezone');
|
|
||||||
if ($tz) {
|
|
||||||
date_default_timezone_set($tz);
|
|
||||||
}
|
|
||||||
|
|
||||||
PhutilErrorHandler::setErrorListener(
|
PhutilErrorHandler::setErrorListener(
|
||||||
array('DarkConsoleErrorLogPluginAPI', 'handleErrors'));
|
array('DarkConsoleErrorLogPluginAPI', 'handleErrors'));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue