1999年10月12日的意义是什么?

System.Web.Security.FormsAuthentication的 SignOut 方法中,ASP.NET 团队通过将过期日期设置为“ Oct 121999”来使 FormsAuth cookie 过期。

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

1999年10月12日的意义是什么?这是一个内部笑话,还是有一些合理的理由设置你的饼干过期日期到特定的日期?

编辑: 下面的理论很有趣,但只是猜测。由于 菲尔斯科特和 ASP.NET 团队的其他成员都使用 StackOverflow,我认为提供 赏金会很有趣。希望有人能够找到最初的开发人员并得到权威的答案。

敬斯科特 · 汉塞尔曼把这个案子升级到 斯科特・古。我真的希望是某种超级秘密,光明会式的意思,但看起来只是老的“一年前”的把戏。

11362 次浏览

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.

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

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.

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.

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!

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

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)

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???

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

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

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.