summaryrefslogtreecommitdiff
path: root/src/timedated.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-07-21 20:28:27 +0200
committerKay Sievers <kay.sievers@vrfy.org>2011-07-21 20:28:27 +0200
commitff4daf5a348278abed4dbf8afc3c4297b8cb9877 (patch)
treea9940950447c6ed8b4412d2bb4201df449d9fff1 /src/timedated.c
parentf68c5a70762da0cbb6228d05a87254a7c6c46ba6 (diff)
fix hwclock_apply_localtime_delta() to properly handle negative TZ offset
Localtime may be a negative number, i.e. GMT-7. Fix based on a patch from Kelly Anderson <kelly@silka.with-linux.com>.
Diffstat (limited to 'src/timedated.c')
-rw-r--r--src/timedated.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timedated.c b/src/timedated.c
index 55cc904f0c..4abcf1af73 100644
--- a/src/timedated.c
+++ b/src/timedated.c
@@ -332,7 +332,7 @@ static DBusHandlerResult timedate_message_handler(
struct tm *tm;
/* 2. Teach kernel new timezone */
- hwclock_apply_localtime_delta();
+ hwclock_apply_localtime_delta(NULL);
/* 3. Sync RTC from system clock, with the new delta */
assert_se(clock_gettime(CLOCK_REALTIME, &ts) == 0);
@@ -382,7 +382,7 @@ static DBusHandlerResult timedate_message_handler(
/* 2. Teach kernel new timezone */
if (local_rtc)
- hwclock_apply_localtime_delta();
+ hwclock_apply_localtime_delta(NULL);
else
hwclock_reset_localtime_delta();