1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 10:12:41 +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:
Nick Harper 2012-07-02 19:39:41 -07:00
parent bda5c670bc
commit 4cb4112686

View file

@ -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'));