diff --git a/README.md b/README.md index a3e8607..85dc365 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ To check if your server is set up correctly, turn on a debug mode (in config add * Combine parameters in url using `&`, e.g. show posts between dates: `http://blog/#from=2017-06&to=2017-08`. ## Localisation -Timezone can be set using `TZ` environment variable. List of supported values can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). +Timezone can be set in config or, for docker users, `TZ` environment variable is supported. List of timezones can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). ### Language support Feel free to create new PR and add a new language. Specify language in config or in url: `http://blog/?hl=sk`. diff --git a/common.php b/common.php index 87d1c8e..684159d 100644 --- a/common.php +++ b/common.php @@ -28,7 +28,7 @@ if(Config::get_safe('debug', false)){ Lang::load(empty($_GET["hl"]) ? Config::get("lang") : $_GET["hl"]); // Timezone -if(false !== ($TZ = getenv('TZ'))) { +if(false !== ($TZ = Config::get_safe('timezone', getenv('TZ')))) { date_default_timezone_set($TZ); ini_set('date.timezone', $TZ); } diff --git a/config.ini b/config.ini index 0253df0..f31f6b2 100644 --- a/config.ini +++ b/config.ini @@ -56,6 +56,7 @@ logs_path = data/logs/ ;proxytype = URL_PREFIX [system] +;timezone = Europe/Vienna system_name = blog version = 1.253 debug = false