376: Bug

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search



However, since UNIX included a number of system functions to manipulate these dates, some developers mistook them for a general purpose date object, and misused them in applications requiring dates before the epoch, by using negative values. Such usage would inevitably fail; for example, since the value isn't specified to be signed or unsigned, the date might be considered to be far in the future, instead of in the past.

Cueball has clearly misused the system date in some way (probably by using an unsigned data type to store the timestamp, which cannot store negative values (in this case dates before 1970) or doing some other operation that doesn’t support negative values). His friend makes a pun by combining "Epoch" with "Epic Fail" - a colloquial term meaning "a very big mistake was made."

Another problem using the UNIX system date as a general purpose date object is commonly known as the year 2038 problem. At 03:14:08 on 19 January 2038, the 32-bit versions of the Unix time stamp will cease to work, as it will overflow the largest value that can be held in a signed 32-bit number. The 64-bit version "will" expire at 15:30:08 on 4 December 292,277,026,596.

The title text takes the joke to the next level, claiming that the entire universe began when Unix did, and therefore no one could have been older than 38 at the time when the comic was released in 2008. The formula is 'x - 1970', where x is the current year, which would explain the bug, since no earlier dates are possible. This is also similar to Last Thursdayism.

An example of this 2 to the 32nd power time overflow problem includes the Deep Impact spacecraft, which, on August 11, 2013, 00:38:49 (more than five years after the comic), was 2 to the 32nd power tenths of a second from January 1, 2000. There is speculation that a system on the craft tracked time in one-tenth second increments since January 1, 2000 and stored it in a signed 32-bit integer, which then overflowed at some point, similar to the Year 2038 problem.


Cueball: Weird — My code's crashing when given pre-1970 dates.
Friend [pointing at Cueball and his computer]: Epoch fail!




I so look forward to seeing Epoch boom to hurriedly uplift 32 bit code before the 'end'. Similar to the Y2K boom. I might consider lending my expertise at a considerable markup. :) Puck0687 (talk) 17:57, 4 December 2015 (UTC)
Rewrite needed

The current explanation barely has to do with the actual topic of the comic. Instead it explains several unrelated qualities of Unix time, and petty much skips over the actual epoch thing. Needs a rewrite. --NeatNit 05:59, 8 February 2015 (UTC)

Why would anyone want to take the square root of a timestamp? It is much more likely that Cueballs program just handles negative time values incorrectly. Condor70 (talk) 07:15, 14 November 2016 (UTC)

I agree, I changed the page to reflect that PotatoGod (talk) 03:33, 14 December 2017 (UTC)

http://coolepochcountdown.com/ links to this site saying that XKCD captured moment when Unix time counter reached 1234567890, so maybe this comic is released at that moment (talk) (please sign your comments with ~~~~)

No, that time would occur about a year from this comic's publication (13 February 2009 at 23:31:30 UTC). 607: 2038 was published 8 July 2009, which is about five months too late, and I have no idea how 543: Sierpinski Valentine had to do with Unix time. 22:34, 16 April 2019 (UTC)