Implementability and Time.TimeDiff

Dylan Thurston
Sat, 21 Jun 2003 00:59:27 +0200

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:
> 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.


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

Version: GnuPG v1.2.2 (GNU/Linux)