Mariano Suarez Alvarez <[EMAIL PROTECTED]> writes:

> How can one translate the age of a file as represented by a value of type 
> PosixUtil.EpochTime into a Time.CalendarTime object?

        import Time
        import Posix

        epochToCalendarTime :: EpochTime -> CalendarTime
        epochToCalendarTime t = toCalendarTime (TOD (toInteger t) 0)

should do the trick.  Perhaps this should go into the Posix library
somewhere. 

Cheers,
        Simon

-- 
Simon Marlow                                             [EMAIL PROTECTED]
University of Glasgow                       http://www.dcs.gla.ac.uk/~simonm/
finger for PGP public key

Reply via email to