News for hackers. Stuff that matters.
Re:Should the leap second be eliminated? by masklinn on Thursday January 19, 2012 @08:50AM (#3484430)
> The past decade has seen immense improvements, though. JodaTime is pretty neat and JSR-310 seems to be an improvement on that (haven't used it though).

Joda is pretty much the 0.1% in question. On its own.

> I agree, but it's the context that's hard. You need some way for your abstraction to capture the fact that a "minute" can sometime consist of 61 seconds.

Absolutely.

> Consider an application that monitors the number of foos per minute where the developer perfectly reasonable uses the "minute" abstraction. This might then exhibit faulty behaviour when there's a leap second inserted - suddenly there's 1/60th more foos reported in a minute.

Ideally, this application should monitor the number of foos per [[time unit]], and only convert from [[time unit]] to minutes when it displays information.

Of course you'd still have contextual issues:

> Depending on the application, that might be statistically insignificant and can safely be ignored, or it might be a red flag that triggers someones pager to go off (or worse).

Yeah. Unless those triggers use the rate per [[time unit]] instead of using the rate per "human" unit (would blow up on summer time end as well, as it "replays" a full human hour)

There are no comments on this comment yet.