News for hackers. Stuff that matters.
Re:June 30th 2012 will be 1 second longer: 23:59:60 by aardvark179 on Thursday June 14, 2012 @07:44PM (#4114171)
Java hedges its bets. System.currentTimeMillis refers you to the docs for java.util time which states

"Although the Date class is intended to reflect coordinated universal time (UTC), it may not do so exactly, depending on the host environment of the Java Virtual Machine."

and further down in notes on possible ranges of return values

"A second is represented by an integer from 0 to 61; the values 60 and 61 occur only for leap seconds and even then only in Java implementations that actually track leap seconds correctly. Because of the manner in which leap seconds are currently introduced, it is extremely unlikely that two leap seconds will occur in the same minute, but this specification follows the date and time conventions for ISO C."

Re:June 30th 2012 will be 1 second longer: 23:59:60 by aphyr on Thursday June 14, 2012 @08:03PM (#4114242)
Yeah, I was reading the same docs with confusion. My coworker cscotta dug down into the source. Oracle's JVM on Linux just calls gettimeofday(), which means System.currentTimeMillis will go all wonky during leap seconds. Ah, documentation. :D