Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2007 09:01:13 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        dot@dotat.at
Cc:        grog@freebsd.org, cvs-src@freebsd.org, src-committers@freebsd.org, brian@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/usr.bin/touch touch.1 touch.c
Message-ID:  <20070410.090113.-432836671.imp@bsdimp.com>
In-Reply-To: <Pine.LNX.4.64.0704101101450.24971@hermes-1.csi.cam.ac.uk>
References:  <20070409.222011.1689682576.imp@bsdimp.com> <20070410050011.GH91694@wantadilla.lemis.com> <Pine.LNX.4.64.0704101101450.24971@hermes-1.csi.cam.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <Pine.LNX.4.64.0704101101450.24971@hermes-1.csi.cam.ac.uk>
            Tony Finch <dot@dotat.at> writes:
: On Tue, 10 Apr 2007, Greg 'groggy' Lehey wrote:
: >
: > The definition of time_t is simply a number of seconds since a
: > specified event.
: 
: ... modulo leap second adjustments.
: 
: time_t cannot encode UTC correctly since you need more than a simple
: scalar to do so (e.g. you need a TAI offset or a leap second flag).

Yes.  POSIX defined time_t to be UTC, and then forgot that there's
leap seconds in UTC.  UTC uses a variable radix notation for just such
events, which translates poorly to a single number.  Or at least
translates poorly to time_t which is defined such that one cannot take
them into account.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070410.090113.-432836671.imp>