Time Resolution

Ashley Yakeley ashley at semantic.org
Wed Feb 2 02:24:34 EST 2005


In article <ashley-EF0986.17424301022005 at sea.gmane.org>,
 Ashley Yakeley <ashley at semantic.org> wrote:

> It looks like we may need three types here:
> 
> * one for TAI
> 
> * one for POSIX time, which is a broken encoding of UTC
> 
> * one for correct encoding of UTC

This is the sort of thing I mean:

  newtype TAITime = TAITime Integer deriving (...)

  newtype POSIXTime = POSIXTime Integer deriving (...)

  newtype DiffTime = DiffTime Integer deriving (...)

  type JulianDay = Integer

  data UTCTime = UTCTime JulianDay DiffTime

  getCurrentTime :: IO POSIXTime

  posixToUTCTime :: POSIXTime -> UTCTime

-- 
Ashley Yakeley, Seattle WA



More information about the Libraries mailing list