mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +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);
|
||||
|
||||
// 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.
|
||||
PhabricatorAccessLog::init();
|
||||
$access_log = PhabricatorAccessLog::getLog();
|
||||
|
@ -98,11 +105,6 @@ try {
|
|||
phabricator_fatal("[Initialization Exception] ".$ex->getMessage());
|
||||
}
|
||||
|
||||
$tz = PhabricatorEnv::getEnvConfig('phabricator.timezone');
|
||||
if ($tz) {
|
||||
date_default_timezone_set($tz);
|
||||
}
|
||||
|
||||
PhutilErrorHandler::setErrorListener(
|
||||
array('DarkConsoleErrorLogPluginAPI', 'handleErrors'));
|
||||
|
||||
|
|
Loading…
Reference in a new issue