From d636d376796ec61c1c14fa619c80d4ac62e08a19 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 22 May 2014 21:31:46 +0900 Subject: timesyncd: only update stamp file when we are synchronized Create initial stamp file with compiled-in time to prevent bootups with clocks in the future from storing invalid timestamps. At shutdown, only update the timestamp if we got an authoritative time to store. --- src/shared/clock-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shared/clock-util.c') diff --git a/src/shared/clock-util.c b/src/shared/clock-util.c index 15535732f7..4f31c10b81 100644 --- a/src/shared/clock-util.c +++ b/src/shared/clock-util.c @@ -145,7 +145,7 @@ int clock_reset_timezone(void) { /* * The very first time we set the kernel's timezone, it will warp * the clock. Do a dummy call here, so the time warping is sealed - * and we set only the timezone with next call. + * and we set only the timezone with the next call. */ if (settimeofday(tv_null, &tz) < 0) return -errno; -- cgit v1.2.3-54-g00ecf