From cd667899076a043a6fa064a68c07447d77bba36d Mon Sep 17 00:00:00 2001 From: sandman Date: Sun, 21 Mar 2004 18:01:46 +0000 Subject: The utc variable was not modified according to the -u/-l command line parameters. git-svn-id: svn://busybox.net/trunk/busybox@8654 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- util-linux/hwclock.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'util-linux/hwclock.c') diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index fae511f9c..cf631131b 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c @@ -213,10 +213,16 @@ static const struct option hwclock_long_options[] = { } /* If -u or -l wasnt give check if we are using utc */ - if ((opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME)) == 0) { + if (opt & HWCLOCK_OPT_UTC) { + utc = 1; + } + else if (opt & HWCLOCK_OPT_LOCALTIME) { + utc = 0; + } + else { utc = check_utc(); } - + if (opt & HWCLOCK_OPT_HCTOSYS) { return to_sys_clock ( utc ); } -- cgit v1.2.3-55-g6feb