diff options
| author | Jessica Clarke <jrtc27@FreeBSD.org> | 2022-08-14 18:50:22 +0000 |
|---|---|---|
| committer | Jessica Clarke <jrtc27@FreeBSD.org> | 2022-08-14 18:50:22 +0000 |
| commit | 762dcf10641251c55dda2e6950fef8bb698027ad (patch) | |
| tree | 132387ea0c25f933c14f2ecbde73183d318ab3b7 /sys/dev/goldfish | |
| parent | 9f678cfcb42d1d0ce3898b0e38bb147a3e14834a (diff) | |
Diffstat (limited to 'sys/dev/goldfish')
| -rw-r--r-- | sys/dev/goldfish/goldfish_rtc.c | 5 |
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); |
