aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'timezone/tzselect.ksh')
-rw-r--r--timezone/tzselect.ksh17
1 files changed, 16 insertions, 1 deletions
diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
index 010a0deb32..be589240d1 100644
--- a/timezone/tzselect.ksh
+++ b/timezone/tzselect.ksh
@@ -1,4 +1,7 @@
#! @KSH@
+
+# '@(#)tzselect.ksh 1.7'
+
# Ask the user about the time zone, and output the resulting TZ value to stdout.
# Interact with the user via stderr and stdin.
@@ -289,5 +292,17 @@ Universal Time is now: $UTdate."
do :
done
-# Output the answer.
+case $SHELL in
+*csh) file=.login line="setenv TZ '$TZ'";;
+*) file=.profile line="TZ='$TZ'; export TZ"
+esac
+
+echo >&2 "
+You can make this change permanent for yourself by appending the line
+ $line
+to the file '$file' in your home directory; then log out and log in again.
+
+Here is that TZ value again, this time on standard output so that you
+can use the $0 command in shell scripts:"
+
echo "$TZ"