Mail Archives: djgpp/1994/08/28/11:16:21
On Sun, 28 Aug 1994 eliz AT is DOT elta DOT co DOT il wrote:
> Unlike Unix, DOS sets file creation time using *local clock*, not
> GMT, so copying a file from a remote machine will change the time
> fields which stat() returns (unless, of course, both machines work in
> GMT0 or local wall clock).
NO NO NO, this can't be correct. The MSDOS "FILESYSTEM" stores the time
of the files in local time. Any DOS, or Unix or whatever, program which
copies a file from a DOS filesystem to a Unix, or other file system that
uses TZ's, should automatically convert from DOS's "local" time to GMT.
Because DOS does not have timezones, the programs should assume that the
"local" time of the files is in the same timezone as where the machine
doing the copying is located. I.E., if you copy a file from a DOS
diskette to a Unix filesystem with a time of 05:00, the Unix machine
should assume that that means 05:00 EST if it's located in that
timezone. This calculation should be a part of the DOS filesystem driver
on the Unix system (I personally don't know of any DOS programs that can
read Unix type filesystems). So, a file's time should NOT change unless
you move the file across timezones. This is really not too much of a
problem, since transportation methods that commonly transfer files over
timezones (e.g., FTP) should be using a standard representation of the
file's time and convert from that standard to the local representation of
time. If you have a DOS machine using FTP, there should be some way of
telling the program what timezone you are in so it can do these
conversions correctly. At least this is the way it SHOULD work.
Fred Reimer
+-------------------------------------------------------------+
| The views expressed in the above are solely my own, and are |
| not necessarily the views of my employer. Have a nice day! |
| PGP2.6 public key available via `finger fwreimer AT crl DOT com` |
+-------------------------------------------------------------+
- Raw text -