Implementability and Time.TimeDiff

Dylan Thurston dpt@math.harvard.edu
Sat, 21 Jun 2003 00:59:27 +0200


--Yylu36WmvOXNoKYn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jun 20, 2003 at 01:45:03PM -0700, John Meacham wrote:
> On Fri, Jun 20, 2003 at 07:36:23PM +0200, Dylan Thurston wrote:
> > Should there also be a function to get offsets (in seconds) between
> > UTC and TAI?

On reflection, I think this is too precise information to be
accessible from a portable library.  In particular, I'm not sure it's
possible to correctly implement a TAI-based time system on most Linux
distributions without modification (I was rather shocked to discover
this...), and I'm sure there are some desired platforms for Haskell
which make it very hard to implement that.  So the standard should
_allow_ for correct implementations, but not _require_ it.

> yes. this would solve another problem I mentioned in a different email
> about the user implementing their own time types and needing the raw
> leap second info. perhaps:
>=20
> leapSeconds :: ClockTime -> Int
> ...

That's probably too precise: perhaps the implementation has no access
to raw leap seconds, or perhaps the standard changes and the offset is
no longer an integer number of seconds.

Peace,
	Dylan

--Yylu36WmvOXNoKYn
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+85HPVeybfhaa3tcRAiuEAJ9Vlh97Gfk+IRSqmC99D4+m53nYWwCeJjXW
PwD4NuAgR5fc32i9S/kE1b0=
=iQac
-----END PGP SIGNATURE-----

--Yylu36WmvOXNoKYn--