7 Jul 10:57
Re: RFC: Time Library 0.1
Ashley Yakeley <ashley <at> semantic.org>
2005-07-07 08:57:19 GMT
2005-07-07 08:57:19 GMT
In article <87zmszqafq.fsf <at> sefirot.ii.uib.no>, Ketil Malde <ketil+haskell <at> ii.uib.no> wrote: > > Returning a built-in table is worse than useless, as any program > > compiled with it will soon break. > > Apparently, that's what the Perl library (libdatetime-leapsecond-perl) > does. (It's the only thing I can find on my box that seems to worry > about leap seconds) > > "break" as in "give slightly inaccurate results". Well, if you don't mind being off by a second or two, then you don't need leap-seconds at all. Otherwise the program you compiled in 2005 will be wrong in 2010. > > We could however check for /etc/leapseconds.txt, that might be useful. > > But it's not clear what the behaviour on Windows or other platforms > > should be. > > Is /etc/leapseconds.txt a standardized file/location at all? I don't even know if it is. > > readLeapSecondTable :: FilePath -> IO LeapSecondTable > > It would be nice if it had the ability to fetch the table over the net > as well, perhaps? We should at least also (or instead) have parseLeapSecondTable :: String -> Maybe LeapSecondTable This would parse "leap.sec" files as provided by USNO (unless there's some other standard format). -- -- Ashley Yakeley, Seattle WA
RSS Feed