Data.Time questions

Bjorn Buckwalter bjorn.buckwalter at
Sun May 11 22:21:27 EDT 2008

On Sun, May 11, 2008 at 9:06 PM, Ashley Yakeley <ashley at> wrote:
>> I've implemented 'ParseTime' and 'Read' instances for 'AbsoluteTime'.
>> Before submitting a patch I want to confirm with you that they belong
>> in 'Data.Time.Format.Parse' as opposed to 'Data.Time.Clock.TAI'. Is
>> this correct?
> I'm not sure if it matters, since it is instances rather than new exported
> symbols, and anyone using those instances must have both AbsoluteTime and
> ParseTime in scope already.

True for the 'ParseTime' instance but not necessarily so for the
'Read' instance.

I recall being rather confused at first that 'UTCTime' and its 'Show'
and 'Read' instances were in three different modules, but perhaps it
has to be that was due to dependencies. This doesn't seem to be the
case with 'AbsoluteTime' so since you don't seems to have any
preference I'll put them all in 'Data.Time.Clock.TAI'.

>> I'm doing work on additional time coordinates of interest to e.g.
>> astrodynamicists. In particular Terrestrial Time (TT = TAI + 32.184
>> seconds, previously known as Terrestrial Dynamical Time or TDT) and
>> perhaps Geocentric Coordinate Time (TCG) and others. Would you be
>> interested in receiving patches with these rather esoteric time
>> coordinates? If not I'll release them in a new "time-astro" package.
> Are you going to create a new type for TT?
> TT is isomorphic to TAI in the category of measurements. I've generally
> tried to avoid separate types for isomorphic measurements. That's why it's
> called AbsoluteTime rather than TAITime...

I did already create a new type for TT. However, what you are saying
makes sense too (I've been wondering about the 'AbsoluteTime' name).
I'm not sure that how to best handle parsing and formatting of TT
without another type though... I'll give it some thought.

Hmm, I realize I might also have to reconsider my 'ParseTime' instance
for 'AbsoluteTime' before I submit that patch...


More information about the Libraries mailing list