diff options
Diffstat (limited to 'src/core/libs/lib-misc.sh')
-rw-r--r-- | src/core/libs/lib-misc.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/libs/lib-misc.sh b/src/core/libs/lib-misc.sh index 1e8df8e..aa00dc6 100644 --- a/src/core/libs/lib-misc.sh +++ b/src/core/libs/lib-misc.sh @@ -104,6 +104,7 @@ cleanup_runtime () # $1 UTC or localtime (hardwareclock) # $2 direction (systohc or hctosys) +# $3 selected TIMEZONE (optional) dohwclock() { # TODO: we probably only need to do this once and then actually use adjtime on next invocations infofy "Resetting hardware clock adjustment file" @@ -116,7 +117,11 @@ dohwclock() { if [ "$1" = "UTC" ]; then hwclock --$2 --utc else - hwclock --$2 --localtime + if [ ! "$3"x == "x" ]; then + local ret=$(TZ=$3 hwclock --$2 --localtime) # we need the subshell so that TZ does not set in this shell + else + hwclock --$2 --localtime + fi fi } @@ -124,4 +129,4 @@ target_configure_initial_keymap_font () { [ -n "$var_KEYMAP" ] && sed -i "s/^KEYMAP=.*/KEYMAP=\"$var_KEYMAP\"/" ${var_TARGET_DIR}/etc/rc.conf [ -n "$var_CONSOLEFONT" ] && sed -i "s/^CONSOLEFONT=.*/CONSOLEFONT=\"$var_CONSOLEFONT\"/" ${var_TARGET_DIR}/etc/rc.conf -}
\ No newline at end of file +} |