diff options
-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 | } |