]> code.ossystems Code Review - openembedded-core.git/commitdiff
base-files: don't export TZ="UTC" from /etc/profile
authorAndre McCurdy <armccurdy@gmail.com>
Tue, 4 Oct 2016 18:51:12 +0000 (11:51 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 4 Oct 2016 23:10:58 +0000 (00:10 +0100)
If no /etc/localtime (or /etc/TZ for uclibc) is found, then the libc
will default to UTC, so setting UTC as a fallback default via the TZ
environment variable is redundant.

Since having the TZ environment variable set causes /etc/localtime
to be ignored, it can cause confusion if /etc/localtime is added
interactively after /etc/profile has been run.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/base-files/base-files/profile

index a52bf89cfdcd6514f5d1e14b118de108ebfa570f..0a05e455ffded3060c0ca5e7804f093830d576ec 100644 (file)
@@ -5,12 +5,6 @@ PATH="/usr/local/bin:/usr/bin:/bin"
 EDITOR="vi"                    # needed for packages like cron, git-commit
 test -z "$TERM" && TERM="vt100"        # Basic terminal capab. For screen etc.
 
-if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
-       TZ="UTC"                # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
-                               # for an explanation of how to set this to your local timezone.
-       export TZ
-fi
-
 if [ "$HOME" = "ROOTHOME" ]; then
    PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
 fi