- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Token first post
Admin
Token for first post has expired
Admin
Looks like the new code is working, then.
Admin
What, no terrible consequences? It's like a weaker version of that other story where the caching was set to 10 years on a page with a terrible bug in.
Admin
Sacha received custody of a legacy Python API, and was tasked with implementing a fresh version of it. And then the murders began.
Admin
I was going to be frist, but my token expired.
Admin
I will be still working the March 4th, 2064...
Admin
So now common, or garden, bugs are worthy of daily WTF?
Admin
Maybe.
"I plan to live forever, of course, but barring that I'd settle for a couple thousand years. Even five hundred would be pretty nice." -- CEO Nwabudike Morgan, Sid Meier's Alpha Centauri
Admin
"... the current Unix timestamp—which is the number of seconds that have transpired since January 1, 1970."
"Transpired?" Odd turn of phrase. "Elapsed," perhaps?
Admin
Once again, this proves the axiom: Date and time calculations are never "easy".
On Unix timestamps: While they purport to show the number of seconds since 1/1/70, they (according to standards) do not take into account leap seconds. While this may be trivial, if you are setting the clock, you need to "know".
Admin
happened, occurred, taken place, arisen, come about -- All seem fine, and happen to all by synonyms for transpired....
Admin
Sorry, but that's not it. Date and time are never easy indeed, but this is not what caused this failure. The programmer simply had more variables to take care of than their tiny brain could manage. They forgot what each variable contained, didn't bother to test when the first attempt seemingly worked, thus a WTF
ensuedtranspired.Admin
The leap seconds are accounted for, just you can't tell the difference between 00:00:00 and 23:59:60 (the previous day) when one occurs. Or they spread that second out over the entire day.
Admin
Frankly, I wouldn't be surprised if it were an autocomplete error. You've got a bunch of long variable names to return in one statement, it's easy to type "exp", hit tab, and forget about it as you tab-complete everything else and see that it runs.
Admin
Ah yes, I think there's a good chance for an autocomplete mistake here. Still, it is just the means, not the "perpetrator of the crime". The programmer who uses autocomplete or Intellisense is responsible for making sure that the correct variable, class, function or whatever else is the one that will end up in the source. If that moron has to defer to the computer... well, let's say that they should work elsewhere. Elsewhere wildly different. Most likely within the Amish.
Admin
On a side note, I can't tell if the spammers are getting better or worse. They're obviously having even less trouble getting past the captcha, but at least they used to attempt to weave a semblance of a reasonable comment on the story into their spammy text.
The best written spam this site has seen in a while is in http://thedailywtf.com/articles/comments/it-s-no-big-deal . From there til now the spammer seems to have devolved. Maybe it was too much work to write pretend comments like that?
Admin
No, most of the time you don't need to know since leap seconds appear to computers just like they had a clock glitch by a second. If you're on a system that only synchs its clock to NTP once a week, dealing with more drift than that is actually normal. You can just pretend and everything works well enough.
Where it matters is when you're dealing with a very high accuracy time source like GPS, but that's really a small minority of developers.
Admin
One of the spam bots has taken a comment from the last post and just added a spam link at the end. It might have worked better if this were a site where comments on consecutive posts are likely to have similar subjects.
Admin
You need good NTP if you're going to rely on these tokens. My boss wondered why my code to access a particular Mozilla API wasn't working for him. Turns out that their maximum expiration (60 seconds at the time) exceeded his clock drift, so his tokens were permanently expired.
Admin
The website is looking a bit flashy and it catches the visitors' eyes. https://www.modelescortsindelhi.com/ The design is pretty simple and has a good user-friendly interface.