Commit d7091dd8 authored by Alessandro Rubini's avatar Alessandro Rubini

trivial: tai - uts is 35, not 34, these years

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 4733b23c
...@@ -16,7 +16,7 @@ static int bare_time_get(struct pp_instance *ppi, TimeInternal *t) ...@@ -16,7 +16,7 @@ static int bare_time_get(struct pp_instance *ppi, TimeInternal *t)
pp_error("%s:", __func__); pp_error("%s:", __func__);
sys_exit(1); sys_exit(1);
} }
/* TAI = UTC + 34 */ /* TAI = UTC + 35 */
t->seconds = tv.tv_sec + DSPRO(ppi)->currentUtcOffset; t->seconds = tv.tv_sec + DSPRO(ppi)->currentUtcOffset;
t->nanoseconds = tv.tv_usec * 1000; t->nanoseconds = tv.tv_usec * 1000;
if (!(pp_global_flags & PP_FLAG_NOTIMELOG)) if (!(pp_global_flags & PP_FLAG_NOTIMELOG))
...@@ -42,7 +42,7 @@ static int bare_time_set(struct pp_instance *ppi, TimeInternal *t) ...@@ -42,7 +42,7 @@ static int bare_time_set(struct pp_instance *ppi, TimeInternal *t)
return 0; return 0;
} }
/* UTC = TAI - 34 */ /* UTC = TAI - 35 */
tv.tv_sec = t->seconds - DSPRO(ppi)->currentUtcOffset; tv.tv_sec = t->seconds - DSPRO(ppi)->currentUtcOffset;
tv.tv_usec = t->nanoseconds / 1000; tv.tv_usec = t->nanoseconds / 1000;
......
...@@ -28,7 +28,7 @@ static int unix_time_get(struct pp_instance *ppi, TimeInternal *t) ...@@ -28,7 +28,7 @@ static int unix_time_get(struct pp_instance *ppi, TimeInternal *t)
struct timespec tp; struct timespec tp;
if (clock_gettime(CLOCK_REALTIME, &tp) < 0) if (clock_gettime(CLOCK_REALTIME, &tp) < 0)
clock_fatal_error("clock_gettime"); clock_fatal_error("clock_gettime");
/* TAI = UTC + 34 */ /* TAI = UTC + 35 */
t->seconds = tp.tv_sec + DSPRO(ppi)->currentUtcOffset; t->seconds = tp.tv_sec + DSPRO(ppi)->currentUtcOffset;
t->nanoseconds = tp.tv_nsec; t->nanoseconds = tp.tv_nsec;
t->correct = 1; t->correct = 1;
...@@ -54,7 +54,7 @@ static int unix_time_set(struct pp_instance *ppi, TimeInternal *t) ...@@ -54,7 +54,7 @@ static int unix_time_set(struct pp_instance *ppi, TimeInternal *t)
return 0; return 0;
} }
/* UTC = TAI - 34 */ /* UTC = TAI - 35 */
tp.tv_sec = t->seconds - DSPRO(ppi)->currentUtcOffset; tp.tv_sec = t->seconds - DSPRO(ppi)->currentUtcOffset;
tp.tv_nsec = t->nanoseconds; tp.tv_nsec = t->nanoseconds;
if (clock_settime(CLOCK_REALTIME, &tp) < 0) if (clock_settime(CLOCK_REALTIME, &tp) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment