94

In the SignOut method of System.Web.Security.FormsAuthentication, the ASP.NET team chose to expire the FormsAuth cookie by setting the expiration date to "Oct 12 1999".

HttpCookie cookie = new HttpCookie(FormsCookieName, str);
cookie.HttpOnly = true;
cookie.Path = _FormsCookiePath;
cookie.Expires = new DateTime(0x7cf, 10, 12);

What's the significance of October 12th, 1999? Is it an inside joke, or is there some valid reason to set your cookie expiration to that particular date?

Edit: The theories below are interesting, but they are just guesses. Since Phil, Scott, and other members of the ASP.NET team are on StackOverflow, I thought it would be fun to offer a bounty. Hopefully someone can track down the original developer and get an authoritative answer.

Awarded: To Scott Hanselman for escalating this one all the way to ScottGu. I was really hoping for some sort of super-secret, Illuminati-esque meaning, but looks like it was just the old "one year ago" trick.

Community
  • 1
  • 1
Portman
  • 31,785
  • 25
  • 82
  • 101

12 Answers12

193

Elementary my dear Watson:

  • Oct 12 1999 is exactly 80 days before 1-1 2000.
  • For some people the year 2000 was the end of the world
  • As we know, it takes 80 days to go around the world.
  • So oct 12 1999 was the last possible day to go around the world.
  • As we know internet is wrapped around the world.
  • So packets (and also cookies) travel around the world.
  • The expiration date of Oct 12 1999 is the symbolic last day a packet could be send.
  • There is no need to send it later than this date.
  • So this is the symbolic date for do not expire.
Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
133

Ok, folks, I talked to a dozen different people on the ASP.NET Team. The dev who wrote THAT line of code, we think, is gone. We asked The Gu, and he wasn't sure.

Stefan Schackow, from the team, said, after speaking with Manu Vasandani:

"The ASP.NET developers were being chased by a pack of feral ninjas on fire and thus were under intense pressure to complete the feature whilst fearing for their lives. As a result in the heat of the moment(ary passion) the snap decision was made to set the constant to the current point in time, less one year. Unfortunately the developer who made that decision wasn’t fast enough checking it in, and despite the shortcut ended up dying an agonizing death at the hands of the ninja leader 'Eviscerati Extremus Minus One'."

Translation? The date is one year before the date that line of code was written.

Scott Hanselman
  • 17,712
  • 6
  • 74
  • 89
24

Maybe that line was written on Oct 13th 1999, and they picked "yesterday" as an arbitrary date that would always be in the past.

finnw
  • 47,861
  • 24
  • 143
  • 221
15

I'm not sure it's of any relevance to the development of ASP.NET, but it was my 26th Birthday!

lubos hasko
  • 24,752
  • 10
  • 56
  • 61
Nick Haslam
  • 1,512
  • 1
  • 24
  • 47
9

There is no benefit to any specific date when setting the expiration date of a cookie. Any date that is in the past will cause the browser to delete the cookie.

According to Wikipedia:

  • Pervez Musharraf takes power in Pakistan from Nawaz Sharif through a bloodless coup.
  • The Day of Six Billion: The proclaimed 6 billionth living human in the world is born.
  • Death of Robert Marsden Hope, Australian Justice and Royal Commissioner (b. 1919)
  • Death of Wilt Chamberlain, American basketball player (b. 1936)

Of those, the most likely to me seems Wilt the Stilt. Perhaps the author was a basketball fan.

Ecton
  • 10,702
  • 2
  • 35
  • 44
  • Right, so why not Jan 1 1900 or something? Also, why a date so close in the past, as opposed to something from before the PC was even invented? – Portman Mar 31 '09 at 14:25
  • Perhaps to avoid a negative epoch. Maybe an early browser didn't handle < 1970 (UNIX epoch) correctly. My guess would be that it probably is an easter egg, although I doubt any of the dates above really are the reason :) – Ecton Mar 31 '09 at 15:20
  • Just out of curiosity, it is coincidence that Hope died on the same day the 6 billionth living person was born? – Flynn1179 Feb 09 '15 at 13:17
6

October 12 1999: The World Population Hits 6 Billion

Markus Lausberg
  • 12,177
  • 6
  • 40
  • 66
4

Ok, so no-one I've asked on the team seems to know. Guess is, it was a year to the day after Bill Gates 1998 PDC Keynote???

2

I don't think it's significant. It could just be a meaningless random date in the past, or something like the developer's daughter's birthday - something that has a private meaning to whomever wrote the code.

karim79
  • 339,989
  • 67
  • 413
  • 406
1

If you convert 1999/10/12 as a hex, it's 7CF/A/C. Now you can do a ROT13 on it and you have 2PS/N/P
Probably the illuminati... ;)

I really don't know if there's any sense with this date. I don't think so.

(CW for fun purposes)

guerda
  • 23,388
  • 27
  • 97
  • 146
1

Obviously, the person who wrote it was a big fan of Bill Gates' speech at Telecom '99. Yeah, you remember the one: http://www.microsoft.com/presspass/exec/billg/speeches/1999/10-12telecom.aspx

Doozer Blake
  • 7,677
  • 2
  • 29
  • 40
0

It's 10/12/99 in America and 12/10/99 in Europe, making for a nice confusing date. No one knows if it is in December!

Karl
  • 8,967
  • 5
  • 29
  • 31
0

Just like "how many licks it takes to get to the Tootsie Roll center of a Tootsie Pop", the world may never know.

Greg
  • 16,540
  • 9
  • 51
  • 97