summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-ui-interactive.sh
diff options
context:
space:
mode:
authorGerhard Brauer <gerbra@archlinux.de>2009-06-25 20:05:18 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2009-06-25 21:31:09 +0200
commit42742c4fa29c9a335f9b8ebfbc860590467b7c8e (patch)
treeb7a0fef1554c66eccb8e08b6add9154973c6b278 /src/core/libs/lib-ui-interactive.sh
parent174a6038d44468ca8e98f849024cdbb2ba7e2c01 (diff)
Fixed timesetting for hwclock localtime users
When we set system time from the BIOS clock via hwclock we must honor the timezone the user previous selected during interactive_time(). After boot we are in an UTC environment. If we now - for localtime users - parse hwclcock value to systemtime, then we get later a false systemtime when copying the TZ file to /etc/localtime. Changing /etc/localtime always recalculate the time according to the timezone. Signed-off-by: Gerhard Brauer <gerbra@archlinux.de>
Diffstat (limited to 'src/core/libs/lib-ui-interactive.sh')
-rw-r--r--src/core/libs/lib-ui-interactive.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 812753e..ae3ccd2 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -106,8 +106,8 @@ interactive_time () {
NEXTITEM=
while true; do
- dohwclock $HARDWARECLOCK hctosys
- current=`date`
+ dohwclock $HARDWARECLOCK hctosys $TIMEZONE
+ current=$(TZ=$TIMEZONE date)
default=no
[ -n "$NEXTITEM" ] && default="$NEXTITEM"
#TODO: only propose if network ok