]> arthur.barton.de Git - ax-zsh.git/commitdiff
30_env: Make sure "TZ" is set, when possible
authorAlexander Barton <alex@barton.de>
Sat, 7 Oct 2017 15:30:53 +0000 (17:30 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 30 Oct 2017 00:13:46 +0000 (01:13 +0100)
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"