News for hackers. Stuff that matters.
Re:Falsehoods programmers believe about time and time zones by deathanatos on Sunday April 17, 2016 @06:52PM (#11516717)
> It bothers me that a minute is not always 60 seconds. For leap seconds why did we choose 23:59:60 instead of 24:00:00?

But how does this solve the problem? Sure, 23:59 is now 60 seconds long, but the minute 24:00 is only 1 second long.

Re:Falsehoods programmers believe about time and time zones by pg_bot on Sunday April 17, 2016 @07:22PM (#11516823)
It's about consistency. 23:59:60 is introducing a special case to the seconds field which you have to account for. 24:00:00 only adds a second to the day where it naturally should go. I don't redefine what a minute is, a minute is always 60 seconds. You are confusing two separate ideas, displaying a time and finding the difference between two times. Lexically you wouldn't say that minute is 1 second long, you would say that the day ends on the first second of the last new minute.
Re:Falsehoods programmers believe about time and time zones by paulddraper on Sunday April 17, 2016 @10:58PM (#11517469)
But then you have a second that doesn't belong to a minute.
Re:Falsehoods programmers believe about time and time zones by pg_bot on Monday April 18, 2016 @01:34AM (#11517891)
...so what that doesn't matter? Imagine you are an evil genius who has built a rocket to extend earth's orbit by an hour each day. How would you now represent time for a day once we live in that new orbit? Most people would just add an hour so the days end at 24:59:59. What if the rocket didn't extend time by an hour but instead by 59 minutes and 59 seconds. What would you do then? We can repeat this until we get down to one second. Wouldn't it make sense to end up at 24:00:00 instead of 23:59:60 in that situation?
Re:Falsehoods programmers believe about time and time zones by Scarblac on Monday April 18, 2016 @05:43AM (#11518698)
Surely "24" introduces a special case to the hours field which you have to account for?