aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/goldfish/goldfish_rtc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/goldfish/goldfish_rtc.c b/sys/dev/goldfish/goldfish_rtc.c
index 6cd209ff5872..31b671cd4b3e 100644
--- a/sys/dev/goldfish/goldfish_rtc.c
+++ b/sys/dev/goldfish/goldfish_rtc.c
@@ -151,6 +151,11 @@ goldfish_rtc_settime(device_t dev, struct timespec *ts)
sc = device_get_softc(dev);
+ /*
+ * We request a timespec with no resolution-adjustment. That also
+ * disables utc adjustment, so apply that ourselves.
+ */
+ ts->tv_sec -= utc_offset();
nsec = (uint64_t)ts->tv_sec * 1000000000 + ts->tv_nsec;
mtx_lock(&sc->mtx);