diff options
author | sandman <sandman@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-03-21 18:01:46 +0000 |
---|---|---|
committer | sandman <sandman@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-03-21 18:01:46 +0000 |
commit | cd667899076a043a6fa064a68c07447d77bba36d (patch) | |
tree | 36c11517eea69903876560919c6821d475c12fc9 /util-linux/hwclock.c | |
parent | 2d4ac5d4cb85a57857f598d121f4d85c67454e43 (diff) | |
download | busybox-w32-cd667899076a043a6fa064a68c07447d77bba36d.tar.gz busybox-w32-cd667899076a043a6fa064a68c07447d77bba36d.tar.bz2 busybox-w32-cd667899076a043a6fa064a68c07447d77bba36d.zip |
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
Diffstat (limited to 'util-linux/hwclock.c')
-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 fae511f9c..cf631131b 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c | |||
@@ -213,10 +213,16 @@ static const struct option hwclock_long_options[] = { | |||
213 | } | 213 | } |
214 | 214 | ||
215 | /* If -u or -l wasnt give check if we are using utc */ | 215 | /* If -u or -l wasnt give check if we are using utc */ |
216 | if ((opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME)) == 0) { | 216 | if (opt & HWCLOCK_OPT_UTC) { |
217 | utc = 1; | ||
218 | } | ||
219 | else if (opt & HWCLOCK_OPT_LOCALTIME) { | ||
220 | utc = 0; | ||
221 | } | ||
222 | else { | ||
217 | utc = check_utc(); | 223 | utc = check_utc(); |
218 | } | 224 | } |
219 | 225 | ||
220 | if (opt & HWCLOCK_OPT_HCTOSYS) { | 226 | if (opt & HWCLOCK_OPT_HCTOSYS) { |
221 | return to_sys_clock ( utc ); | 227 | return to_sys_clock ( utc ); |
222 | } | 228 | } |