Skip to content

Commit 180f2b9

Browse files
committed
Fixed: FS#2418 - PHP: Timezone ID 'CEST' is invalid
1 parent 41a74e1 commit 180f2b9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

install/install.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,15 @@
105105
//** Select the language and set default timezone
106106
$conf['language'] = $inst->simple_query('Select language', array('en','de'), 'en');
107107

108-
exec('date +%Z', $tmp_out);
109-
$conf['timezone'] = $tmp_out[0];
108+
exec('date +%z', $tmp_out);
109+
$tmp_zone = intval($tmp_out[0]);
110+
if(substr($tmp_out[0],0,1) == '+') {
111+
$conf['timezone'] = 'Etc/GMT+'.$tmp_zone;
112+
} else {
113+
$conf['timezone'] = 'Etc/GMT-'.$tmp_zone;
114+
}
110115
unset($tmp_out);
116+
unset($tmp_zone);
111117

112118
//* Set defaukt theme
113119
$conf['theme'] = 'default';

0 commit comments

Comments
 (0)