4 ms·
As it happens - neither is a day, or even an hour. The exceptions are rarer, which only makes bugs even more insidious when they do happen (like dealing with le
by nippoo 7y ago
As it happens - neither is a day, or even an hour. The exceptions are rarer, which only makes bugs even more insidious when they do happen (like dealing with leap-seconds, for example. Some hours have 3601 seconds!).
ie: https://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time https://infiniteundo.com/post/25326999628/falsehoods-program...
- mulmen 7y agoWhile this is technically correct is it more accurate to say that some minutes have 61 seconds? Or perhaps that some seconds have two seconds?
- anchpop 7y agoWell, it could also be the case that some minutes have 59 seconds, although afaik it hasn't happened yet.
- MauranKilom 7y agoGiven the trend of leap seconds, I don't think it will happen (unless we do really stupid things to the earth). See https://what-if.xkcd.com/26/ https://what-if.xkcd.com/26/
- techslave 7y agoi don’t think either is correct. the leap second is an extra second, that’s it. the notation for the extra leap second is lacking so we are “forced” to call it 23:59:60 but that doesn’t mean that minute has 61 seconds. it just means after that minute but before the next one, there’s an inserted second. it’s far more sane to define it that way than to say the duration of a minute (and hence hour, and day, and week) is variable.
- mulmen 7y agoI see what you mean but how do we address that leap second specifically? How do we describe an event that happened during the leap second?