diff options
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_conv.c | 8 | ||||
-rw-r--r-- | sys/fs/nwfs/nwfs_subr.c | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/sys/fs/msdosfs/msdosfs_conv.c b/sys/fs/msdosfs/msdosfs_conv.c index 21836f294292..c9dee480a90a 100644 --- a/sys/fs/msdosfs/msdosfs_conv.c +++ b/sys/fs/msdosfs/msdosfs_conv.c @@ -55,7 +55,7 @@ #include <sys/clock.h> #include <sys/kernel.h> /* defines tz */ #include <sys/systm.h> -#include <machine/clock.h> +#include <sys/clock.h> #include <sys/dirent.h> #include <sys/iconv.h> #include <sys/mount.h> @@ -127,8 +127,7 @@ unix2dostime(tsp, ddp, dtp, dhp) * If the time from the last conversion is the same as now, then * skip the computations and use the saved result. */ - t = tsp->tv_sec - (tz_minuteswest * 60) - - (wall_cmos_clock ? adjkerntz : 0); + t = tsp->tv_sec - utc_offset(); /* - daylight savings time correction */ t &= ~1; if (lasttime != t) { @@ -239,8 +238,7 @@ dos2unixtime(dd, dt, dh, tsp) days += ((dd & DD_DAY_MASK) >> DD_DAY_SHIFT) - 1; lastseconds = (days * 24 * 60 * 60) + SECONDSTO1980; } - tsp->tv_sec = seconds + lastseconds + (tz_minuteswest * 60) - + adjkerntz; + tsp->tv_sec = seconds + lastseconds + utc_offset(); /* + daylight savings time correction */ tsp->tv_nsec = (dh % 100) * 10000000; } diff --git a/sys/fs/nwfs/nwfs_subr.c b/sys/fs/nwfs/nwfs_subr.c index eabcc5f01b72..e5da24aaac2f 100644 --- a/sys/fs/nwfs/nwfs_subr.c +++ b/sys/fs/nwfs/nwfs_subr.c @@ -37,7 +37,7 @@ #include <sys/clock.h> #include <sys/lockmgr.h> #include <sys/malloc.h> -#include <machine/clock.h> +#include <sys/clock.h> #include <sys/time.h> #include <netncp/ncp.h> @@ -598,8 +598,7 @@ ncp_unix2dostime(tsp, tzoff, ddp, dtp, dhp) * If the time from the last conversion is the same as now, then * skip the computations and use the saved result. */ - t = tsp->tv_sec - tzoff * 60 - tz_minuteswest * 60 - - (wall_cmos_clock ? adjkerntz : 0); + t = tsp->tv_sec - tzoff * 60 - utc_offset(); t &= ~1; if (lasttime != t) { lasttime = t; @@ -708,7 +707,6 @@ ncp_dos2unixtime(dd, dt, dh, tzoff, tsp) days += ((dd & DD_DAY_MASK) >> DD_DAY_SHIFT) - 1; lastseconds = (days * 24 * 60 * 60) + SECONDSTO1980; } - tsp->tv_sec = seconds + lastseconds + tz_minuteswest * 60 + - tzoff * 60 + (wall_cmos_clock ? adjkerntz : 0); + tsp->tv_sec = seconds + lastseconds + tzoff * 60 + utc_offset(); tsp->tv_nsec = (dh % 100) * 10000000; } |