The type of time_t (was: struct tm -> time_t converter wanted)

Steve Summit scs at athena.mit.edu
Sat Nov 12 17:25:08 AEST 1988


In article <8810281846.AA20611 at champlain.dgp.toronto.edu> flaps at dgp.toronto.edu (Alan J Rosenthal) writes:
>So any zero-date in the past
>is ok, because a file need not be able to have a timestamp predating the
>writing of the operating system it is available on.

This is, I'll admit, a nit, but I'd suggest otherwise.  I pay a
lot of attention to file modification times, and I often transfer
files between different operating systems (Unix, VMS, MS-DOS)
while attempting to preserve modification times (using tar and
the like).  This means that I have a problem if I take a file
last modified in 1979 to an MS-DOS system, because DOS's epoch is
1980.  (The problem is theoretically even worse when moving files
from VMS, which has an epoch of 1865 or so.)  Not much of a
problem in practice, but it's something to think about.  (And, of
course, it's insoluble.)

                                            Steve Summit
                                            scs at adam.pika.mit.edu



More information about the Comp.std.c mailing list