Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2001 05:43:56 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Peter Wemm <peter@wemm.org>
Cc:        Garance A Drosihn <drosih@rpi.edu>, Julian Elischer <julian@elischer.org>, Nate Williams <nate@yogotech.com>, <arch@FreeBSD.ORG>
Subject:   Re: 64 bit times revisited.. 
Message-ID:  <20011031052447.H4665-100000@delplex.bde.org>
In-Reply-To: <20011030173210.59A5F39F4@overcee.netplex.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 30 Oct 2001, Peter Wemm wrote:

> Bruce Evans wrote:
> > On Mon, 29 Oct 2001, Peter Wemm wrote:
> >
> > > ...  UFS does not have future dates ...
> >
> > Script started on Tue Oct 30 21:04:39 2001
> > ttyv7:bde@delplex:/tmp> touch -t 203801011230 foo
> > ttyv7:bde@delplex:/tmp> ls -l foo
> > -rw-r--r--  1 bde  wheel  0 Jan  1  2038 foo
> > ttyv7:bde@delplex:/tmp> exit
>
> I know that..  This is a contrived example.  atime, mtime, ctime are defined
> as the time that the file was last operated on.  One does not do 30-year
> mortgage calculations using ufs file timestamps.  The only dates they *need*
> to support is "a long time ago" through "now".

Sure it's contrived, but it shows that UFS does have future dates.

In fact, the timestamps for writable POSIX filesystems are implicitly
specified to be able to represent all possible values of a time_t
(including the invalid one (time_t)-1!), because all these values can
be requested using utime(2) and there is no documented way that utime(2)
can fail due to invalid times.  This currently "just works" for ffs
at least, because the timestamps really are time_t's.

The timestamps for writable BSD filesystems are also implicitly specified
to be able to represent all possible values of a long, becaue of the
same considerations for utimes(2).  This currently just doesn't work
for ffs on alphas at least.  Proposterously distant times passed by
utimes(2) cause overflow in TIMEVAL_TO_TIMESPEC().

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011031052447.H4665-100000>