projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b70498
)
WCF now uses server timezone as the default timezone
author
Marcel Werk
<burntime@woltlab.com>
Fri, 12 Apr 2013 18:28:26 +0000
(20:28 +0200)
committer
Marcel Werk
<burntime@woltlab.com>
Fri, 12 Apr 2013 18:28:26 +0000
(20:28 +0200)
wcfsetup/install/files/acp/install.php
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install/files/acp/install.php
b/wcfsetup/install/files/acp/install.php
index 96007cf93822971e070a974de89cc19217a1826e..81a99161501edca5e2a6df28811b09ba43652e6c 100644
(file)
--- 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'));
+ }
+}