aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griebl <griebl@gmx.de>2004-03-21 18:01:46 +0000
committerRobert Griebl <griebl@gmx.de>2004-03-21 18:01:46 +0000
commitc8685ead5770b55d66c01df5bc3fe26053caea54 (patch)
tree36c11517eea69903876560919c6821d475c12fc9
parentbfb51574ae1c289766716ba695a36afcbfd8855a (diff)
downloadbusybox-w32-c8685ead5770b55d66c01df5bc3fe26053caea54.tar.gz
busybox-w32-c8685ead5770b55d66c01df5bc3fe26053caea54.tar.bz2
busybox-w32-c8685ead5770b55d66c01df5bc3fe26053caea54.zip
The utc variable was not modified according to the -u/-l command line
parameters.
-rw-r--r--util-linux/hwclock.c10
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 }