From ada5541dc78a241ab3ef233db96105097fff4160 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sat, 7 Oct 2017 17:30:53 +0200 Subject: [PATCH] 30_env: Make sure "TZ" is set, when possible --- core/30_env/30_env.zprofile | 5 +++++ 1 file changed, 5 insertions(+) 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" -- 2.39.2