Proposal: Use time rather than old-time in directory

Ian Lynagh igloo at
Mon Oct 24 21:24:29 CEST 2011

On Mon, Oct 24, 2011 at 10:10:23AM +0200, Herbert Valerio Riedel wrote:
> E.g., say we get a `setModificationTime` function, then I wouldn't want
> to have to transform back and forth to UTCTime, if I had code like
>   tsave <- getModificationTime fname
>   modifyFileSomeWay fname
>   setModificationTime fname tsave
> I'd want the `time_t` value to be exactly the same it was before the
> modification and not risk being shifted by one in case of leap-seconds.

I think this is OK in the positive leap second case:

There is an ambiguous POSIX timestamp on the FS.
We convert that to one of the two possible UTCTimes.
We convert it back to the ambiguous POSIX timestamp.

In the negative leap second case, it's only a problem if the POSIX
timestamp is a time that never happened. Even then it's idempotent at

Overall, UTCTime is sounding like the best type to me.


More information about the Libraries mailing list