Introduce utc_offset() to capture a calculation currently done all over the
place.
This commit is contained in:
parent
8e52f5465d
commit
f97c1c4bf7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162962
@ -197,3 +197,10 @@ clock_ts_to_ct(struct timespec *ts, struct clocktime *ct)
|
||||
ct->sec = rsec;
|
||||
ct->nsec = ts->tv_nsec;
|
||||
}
|
||||
|
||||
int
|
||||
utc_offset(void)
|
||||
{
|
||||
|
||||
return (tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0));
|
||||
}
|
||||
|
@ -59,6 +59,8 @@ extern int disable_rtc_set;
|
||||
extern int tz_minuteswest;
|
||||
extern int tz_dsttime;
|
||||
|
||||
int utc_offset(void);
|
||||
|
||||
/*
|
||||
* Structure to hold the values typically reported by time-of-day clocks.
|
||||
* This can be passed to the generic conversion functions to be converted
|
||||
|
Loading…
Reference in New Issue
Block a user