From: Alexander Barton Date: Sat, 7 Oct 2017 15:30:53 +0000 (+0200) Subject: 30_env: Make sure "TZ" is set, when possible X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ax-zsh.git;a=commitdiff_plain;h=ada5541dc78a241ab3ef233db96105097fff4160 30_env: Make sure "TZ" is set, when possible --- diff --git a/core/30_env/30_env.zprofile b/core/30_env/30_env.zprofile index bf646f4..653d82e 100644 --- a/core/30_env/30_env.zprofile +++ b/core/30_env/30_env.zprofile @@ -1,6 +1,11 @@ # AX-ZSH: Alex' Modular ZSH Configuration # 30_env.zprofile: Setup environment +# Setup time zone +if [[ -z "$TZ" && -r "/etc/timezone" ]]; then + TZ=$(<"/etc/timezone") export TZ +fi + # Setup XDG cache directory if [[ -z "$XDG_CACHE_HOME" ]]; then XDG_CACHE_HOME="$LOCAL_HOME/.cache"