Bug 283 - When using wall CMOS clock, MS-DOS file timestamps are off
Summary: When using wall CMOS clock, MS-DOS file timestamps are off
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1995-03-29 07:50 UTC by pritc003
Modified: 1995-03-29 07:50 UTC (History)
0 users

See Also:


Attachments
file.diff (3.87 KB, patch)
1995-03-29 07:50 UTC, pritc003
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pritc003 1995-03-29 07:50:01 UTC
If you are using a wall CMOS clock as opposed to a UTC CMOS clock,
the file timestamps on MS-DOS mounted file system are off by the
amount of your timezone adjustment.

Fix: The supplied patch fixes the problem, as well as optimizes the 
dos2unixtime() routine a to eliminate some needless loops in the
code.  The unix2dostime() routine could probably also be optimized
a bit, but it probably only gets called 1/100th as much as the other
routine so I didn't bother.

This patch applies to the following revision of msdosfs_conv.c:

/*	$Id: msdosfs_conv.c,v 1.3 1994/12/12 12:35:42 bde Exp $ */


How-To-Repeat: 
Mount a MS-DOS file system while using a wall CMOS clock and do an
"ls -l" on some file.  Then boot MS-DOS and compare the timestamps.
Comment 1 Andrey A. Chernov freebsd_committer freebsd_triage 1995-03-29 19:48:15 UTC
State Changed
From-To: open->closed

Fix applied.