From ff4daf5a348278abed4dbf8afc3c4297b8cb9877 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 21 Jul 2011 20:28:27 +0200 Subject: 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 . --- src/timedated.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/timedated.c') 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(); -- cgit v1.2.3-54-g00ecf