
Seriously, though, what use is being able to find the difference between two times like this? If I want the difference between two times, I want to specify in what units the difference should be e.g. millisecs, seconds, days, years, etc. The difference between times tA and tB might be 86400 seconds, but they might still be on the same day e.g. leap seconds, so if I ask for (diffDays tA tB) I might get zero, one, or two, depending on the date.
Yes timing between point in time should be independant of leap seconds, so if a program, takes 5 seconds to run it should always take 5 seconds, even if it runs accross midnight. This is why you want to be able to take the difference in abslute time. In which case if you wanted an absolute number of days, you would take an average or standardised day length. (Days are not really a satisfactory unit, perhaps kilo-seconds?) You also might want to get a real difference, in which case you convert the start and end times to localtime, and then take the difference. Localtime is no use for measuring intervals as some days are longer than others... (so to know exactly how long something took you would have to know how many leap-seconds fell within the time interval) Keean.
Alistair.
----------------------------------------- ***************************************************************** Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. *****************************************************************
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries