set timezone in config #14
This commit is contained in:
parent
6128fb62a8
commit
9f255592ff
3 changed files with 3 additions and 2 deletions
|
@ -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`.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ logs_path = data/logs/
|
|||
;proxytype = URL_PREFIX
|
||||
|
||||
[system]
|
||||
;timezone = Europe/Vienna
|
||||
system_name = blog
|
||||
version = 1.253
|
||||
debug = false
|
||||
|
|
Loading…
Add table
Reference in a new issue