diff options
author | Robert Griebl | 2004-03-21 18:01:46 +0000 |
---|---|---|
committer | Robert Griebl | 2004-03-21 18:01:46 +0000 |
commit | c8685ead5770b55d66c01df5bc3fe26053caea54 (patch) | |
tree | 36c11517eea69903876560919c6821d475c12fc9 | |
parent | bfb51574ae1c289766716ba695a36afcbfd8855a (diff) | |
download | busybox-c8685ead5770b55d66c01df5bc3fe26053caea54.zip busybox-c8685ead5770b55d66c01df5bc3fe26053caea54.tar.gz |
The utc variable was not modified according to the -u/-l command line
parameters.
-rw-r--r-- | util-linux/hwclock.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index fae511f..cf63113 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 ); } |