From: Marcel Werk Date: Fri, 12 Apr 2013 18:28:26 +0000 (+0200) Subject: WCF now uses server timezone as the default timezone X-Git-Tag: 2.0.0_Beta_1~375 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9162998cc383584416db85239d0cb2645b11c3c8;p=GitHub%2FWoltLab%2FWCF.git WCF now uses server timezone as the default timezone --- diff --git a/wcfsetup/install/files/acp/install.php b/wcfsetup/install/files/acp/install.php index 96007cf938..81a9916150 100644 --- a/wcfsetup/install/files/acp/install.php +++ b/wcfsetup/install/files/acp/install.php @@ -65,3 +65,14 @@ LanguageEditor::deleteLanguageFiles(); // delete all compiled templates ACPTemplateEngine::deleteCompiledTemplates(WCF_DIR.'acp/templates/compiled/'); + +// get server timezone +if ($timezone = @date_default_timezone_get()) { + if ($timezone != 'Europe/London' && in_array($timezone, \wcf\util\DateUtil::getAvailableTimezones())) { + $sql = "UPDATE wcf".WCF_N."_option + SET optionValue = ? + WHERE optionName = ?"; + $statement = WCF::getDB()->prepareStatement($sql); + $statement->execute(array($timezone, 'timezone')); + } +}