Skip to content

Commit

Permalink
Merge pull request #49 from smuth4/UTC
Browse files Browse the repository at this point in the history
Default to UTC for timezone
  • Loading branch information
othmar52 authored Jan 1, 2017
2 parents 0d35b5a + 1961930 commit 3a49b22
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions core/config/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ cli-verbosity = 1

; currently en, de
langkey = en
; When disabled, these use the system defaults
; When disabled, locale is set to the system defaults
;locale = de_DE.UTF-8
;timezone = Europe/Vienna
timezone = UTC

; display button for quickly browsing through random items (useful for development)
showrandomizer = 0
Expand Down
4 changes: 2 additions & 2 deletions core/config/config_local.sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ absFilePrefix = /

logomarkup = "<span style='font-size:0.8em'>SLI</span>M<span style='font-size:0.8em'>PD</span>"

; When disabled, these use the system defaults
; When disabled, locale is set to the system defaults
;locale = de_DE.UTF-8
;timezone = Europe/Vienna
timezone = UTC


[spotcolor]
Expand Down
4 changes: 1 addition & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@
// Timezone needs to be set before session_start, the locale is also set here for convience
$configLoader = new \Slimpd\Modules\configloader_ini\ConfigLoaderINI(APP_ROOT . 'core/config/');
$config = $configLoader->loadConfig('master.ini');
if (isset($config['config']['timezone'])) {
date_default_timezone_set($config['config']['timezone']);
}
date_default_timezone_set($config['config']['timezone']);
if (isset($config['config']['locale'])) {
setlocale(LC_ALL, array($config['config']['locale']));
}
Expand Down
4 changes: 1 addition & 3 deletions slimpd
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ chdir(dirname(__DIR__));
// Timezone needs to be set before session_start, the locale is also set here for convience
$configLoader = new \Slimpd\Modules\configloader_ini\ConfigLoaderINI(APP_ROOT . 'core/config/');
$config = $configLoader->loadConfig('master.ini');
if (isset($config['config']['timezone'])) {
date_default_timezone_set($config['config']['timezone']);
}
date_default_timezone_set($config['config']['timezone']);
if (isset($config['config']['locale'])) {
setlocale(LC_ALL, array($config['config']['locale']));
}
Expand Down

0 comments on commit 3a49b22

Please sign in to comment.