Set per-user timezone
This commit is contained in:
parent
40ee7a15f9
commit
250679025e
1 changed files with 5 additions and 1 deletions
|
@ -48,6 +48,7 @@ set -o noclobber
|
||||||
# Locale and language.
|
# Locale and language.
|
||||||
## Clear the existing locale settings and set options I always want.
|
## Clear the existing locale settings and set options I always want.
|
||||||
export TIME_STYLE=long-iso # Used by GNU 'ls'.
|
export TIME_STYLE=long-iso # Used by GNU 'ls'.
|
||||||
|
export TZ=Europe/London # Can override this elsewhere if needed.
|
||||||
if [ -f /etc/locale.conf ]
|
if [ -f /etc/locale.conf ]
|
||||||
then
|
then
|
||||||
. /etc/locale.conf
|
. /etc/locale.conf
|
||||||
|
@ -228,7 +229,10 @@ usermotd () {
|
||||||
fi
|
fi
|
||||||
uptime
|
uptime
|
||||||
echo "LANG=$LANG"
|
echo "LANG=$LANG"
|
||||||
if [ -x /usr/bin/timedatectl ] && [ "x$(systemctl is-system-running)" != "xoffline" ]
|
if [ -n "$TZ" ]
|
||||||
|
then
|
||||||
|
echo "TZ=$TZ"
|
||||||
|
elif [ -x /usr/bin/timedatectl ] && [ "x$(systemctl is-system-running)" != "xoffline" ]
|
||||||
then
|
then
|
||||||
timedatectl show --property=Timezone | sed 's/Timezone=/TZ=/'
|
timedatectl show --property=Timezone | sed 's/Timezone=/TZ=/'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue