From 180f2b993a07af348bf19c6071dc6e309d827388 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 12 Sep 2012 09:28:57 -0400
Subject: [PATCH] Fixed: FS#2418 - PHP: Timezone ID 'CEST' is invalid
---
install/install.php | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/install/install.php b/install/install.php
index d2a4416..918526d 100644
--- a/install/install.php
+++ b/install/install.php
@@ -105,9 +105,15 @@
//** Select the language and set default timezone
$conf['language'] = $inst->simple_query('Select language', array('en','de'), 'en');
-exec('date +%Z', $tmp_out);
-$conf['timezone'] = $tmp_out[0];
+exec('date +%z', $tmp_out);
+$tmp_zone = intval($tmp_out[0]);
+if(substr($tmp_out[0],0,1) == '+') {
+ $conf['timezone'] = 'Etc/GMT+'.$tmp_zone;
+} else {
+ $conf['timezone'] = 'Etc/GMT-'.$tmp_zone;
+}
unset($tmp_out);
+unset($tmp_zone);
//* Set defaukt theme
$conf['theme'] = 'default';
--
Gitblit v1.9.1