News for hackers. Stuff that matters.
Re:GitHub search for 84600 seconds. Oops. by chubot on Thursday May 08, 2014 @04:37PM (#7717518)
Haha, should be 86400, not 84600.
Re:GitHub search for 84600 seconds. Oops. by tshaddox on Thursday May 08, 2014 @04:40PM (#7717552)
I liked this one:

    SECONDS_PER_23_5_HOURS = 84600
Re:GitHub search for 84600 seconds. Oops. by markcarlson on Thursday May 08, 2014 @04:49PM (#7717602)
That is a very common value to use when you want something to either occur a bit more than once a day, or time out in a bit less than a day.
Re:GitHub search for 84600 seconds. Oops. by underyx on Thursday May 08, 2014 @04:54PM (#7717639)
And to keep the discussion interesting, also, 12 seconds is a pretty popular timespan to use when you want something longer than 10, but shorter than 15.
Re:GitHub search for 84600 seconds. Oops. by ggreer on Thursday May 08, 2014 @04:58PM (#7717665)
If there was an 84600 with no hinting variable names nearby, anyone reading would have trouble figuring out the author's intention. Any other number (say... 81234) would be unambiguous. In the words of Douglas Crockford, "All that you know about the code is that the programmer was incompetent."
Re:GitHub search for 84600 seconds. Oops. by nkozyra on Thursday May 08, 2014 @04:56PM (#7717647)
I certainly have some code that adds 86399 to encompass the entirety of the day.

This is in languages I use with less robust date logic, of course.

Re:GitHub search for 84600 seconds. Oops. by CanSpice on Thursday May 08, 2014 @05:11PM (#7717739)
Except it shouldn't, because when you have a leap second occur, suddenly you're off by a second.

A day is a day, it's not 86400 seconds.

Re:GitHub search for 84600 seconds. Oops. by rossy on Friday May 09, 2014 @01:16AM (#7719490)
Most operating systems and frameworks don't expose the concept of leap seconds to user code. For example, Unix time is the number of seconds since the epoch ignoring leap seconds, so a program that compares timestamps generated by time() would be correct in assuming that a day is 86400 units of time_t.