]> arthur.barton.de Git - ax-zsh.git/blobdiff - core/30_env/30_env.zprofile
30_env: Make sure "TZ" is set, when possible
[ax-zsh.git] / core / 30_env / 30_env.zprofile
index bf646f4dffbbdca4f660cf178eea8c3f204b1574..653d82e996275f1a60749eafa26beea175a6a361 100644 (file)
@@ -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"