|
The Real WTF is in the countdown
Last post 06-01-2007 7:03 PM by asuffield. 11 replies.
-
05-06-2007 11:44 AM
|
|
-
Einsidler


- Joined on 11-15-2006
- Posts 99
|
The Real WTF is in the countdown
After noticing that the "time left to enter" countdown turns over a new day at midnight my time, I had a look at the page source. I didn't expect this kind of WTF:
var endDate = new Date('5/14/2007 11:59:59 PM'); var now; var countdownSpan = document.getElementById('jsCountdown'); var differenceText; var workingTicks, seconds, minutes, hours, days; function UpdateCountdown() { now = new Date(Date()); if (now >= endDate) { // Negative infinity. Just for kicks. countdownSpan.innerHTML = -(1 / 0); return; } // Some hacky stuff to get around no DateDiff()... workingTicks = Math.floor((endDate - now) / 1000); // Disregard milliseconds seconds = (workingTicks % 60); if (seconds < 10) { seconds = '0' + seconds; } workingTicks = Math.floor(workingTicks / 60); minutes = (workingTicks % 60); workingTicks = Math.floor(workingTicks / 60); hours = (workingTicks % 24); workingTicks = Math.floor(workingTicks / 24); days = workingTicks; differenceText = days + ' day(s), ' + hours + ' hour(s), ' + minutes + ' minute(s) and ' + seconds + ' second(s)' countdownSpan.innerHTML = differenceText; // Let's see if someone spots this and submits it as a WTF setTimeout('UpdateCountdown()', 850); }
UpdateCountdown(); Took me a while to work out the WTF about the second underlined part, but if you watch the countdown intensely, you will notice it doesn't tick at a constant rate, freezing up slightly sometimes due to a new second not occurring in the 850 milliseconds between refreshing the counter. I'm guessing this was put in to mess with the minds of those who would look at the countdown and swear their eyes were playing tricks on them.
Download my OMGWTF entry, Romanorum Computus
|
|
-
-
tster


- Joined on 04-11-2006
- Natick, MA
- Posts 1,295
|
Re: The Real WTF is in the countdown
nice catch.
The pig go. Go is to the fountain. The pig put foot. Grunt. Foot in what? ketchup. The dove fly. Fly is in sky. The dove drop something. The something on the pig. The pig disgusting... see bio for the earth shattering ending.
|
|
-
-
Badr Z.


- Joined on 04-28-2007
- Posts 30
|
Re: The Real WTF is in the countdown
The real WTF is that you lost time for that :)
|
|
-
-
poochner


- Joined on 07-27-2006
- Posts 90
|
Re: The Real WTF is in the countdown
The Real WTF is that it's using a date with no time zone on it. The contest rules say it ends at 5/14/2007 11:59:59 PM EST. I'm sure there are places, but I don't know of any that are still on EST, almost all having switched to EDT a while back. Of course, JavaScript could do some magic, or always assume standard time, but that'd be another class of WTFery.
|
|
-
-
SamP


- Joined on 05-05-2007
- Posts 25
|
Re: The Real WTF is in the countdown
The real WTF is that you can argue for days about which is the last hour to submit your calculator (or any other project, for that matter) Just submit it a day early...
|
|
-
-
freelancer


- Joined on 02-21-2007
- Posts 68
|
Re: The Real WTF is in the countdown
Ehm...did you guys notice something odd? I've been checking the countdown throughout the day (dunno why, though), and here's what I've seen: 9h 40m left 6h 30m left 5h 30m left 2h 30m left 6h 11m left WTF?! I just watched Deja Vu, so I'm kinda paranoid at the moment... I didn't go back in time or anything, did I?
OMGWTF - Are you enterprisey enough?
|
|
-
-
stolen_username


- Joined on 05-08-2007
- East Lansing, MI
- Posts 64
|
Re: The Real WTF is in the countdown
-Infinity seconds left to go!
|
|
-
-
Einsidler


- Joined on 11-15-2006
- Posts 99
|
Re: The Real WTF is in the countdown
freelancer:Ehm...did you guys notice something odd? I've been checking the countdown throughout the day (dunno why, though), and here's what I've seen: 9h 40m left 6h 30m left 5h 30m left 2h 30m left 6h 11m left WTF?! I just watched Deja Vu, so I'm kinda paranoid at the moment... I didn't go back in time or anything, did I?
Time zones where accounted for sometime between the times you accessed it EDIT: I think
Download my OMGWTF entry, Romanorum Computus
|
|
-
-
Zor


- Joined on 05-14-2007
- Posts 7
|
Re: The Real WTF is in the countdown
I've already submitted, but I'm locked out from submitting now. According to the faq, the deadline is "May 14, 2007, 11:59 PM EST.", which means I should have about 10 more minutes. If he really meant EDT, I should have 1 hour 10 minutes left. Maybe he meant CST?
|
|
-
-
cconroy


- Joined on 08-18-2005
- NJ, USA
- Posts 366
|
Re: The Real WTF is in the countdown
poochner:The Real WTF is that it's using a date with no time zone on it. The contest rules say it ends at 5/14/2007 11:59:59 PM EST. I'm sure there are places, but I don't know of any that are still on EST, almost all having switched to EDT a while back.
I was going to say parts of Indiana, but apparently as of last year the whole state observes DST. Too bad, the whole three-times-in-two-time-zones-in-one-state thing was a neat little WTF unto itself.
What Would Brian Boitano Do?
|
|
-
-
Random832


- Joined on 05-09-2007
- Posts 434
|
Re: The Real WTF is in the countdown
cconroy: poochner:The Real WTF is that it's using a date with no time zone on it. The contest rules say it ends at 5/14/2007 11:59:59 PM EST. I'm sure there are places, but I don't know of any that are still on EST, almost all having switched to EDT a while back.
I was going to say parts of Indiana, but apparently as of last year the whole state observes DST. Too bad, the whole three-times-in-two-time-zones-in-one-state thing was a neat little WTF unto itself.
Of course, look at the big picture - switching time zones for some western counties at the same time now means that for programs wanting to have historically correct data back to 1970 (as the tz database tries to), there are now no less than NINE zones applying to the state. (shame that it only goes back to 1970 - some of the real WTFery happened in the 60s from what i've read - with the time zone line slowly creeping westward over the course of the decade)
|
|
-
-
asuffield


- Joined on 05-31-2006
- Posts 2,137
|
Re: The Real WTF is in the countdown
Random832: cconroy: poochner:The Real WTF is that it's using a date with no time zone on it. The contest rules say it ends at 5/14/2007 11:59:59 PM EST. I'm sure there are places, but I don't know of any that are still on EST, almost all having switched to EDT a while back.
I was going to say parts of Indiana, but apparently as of last year the whole state observes DST. Too bad, the whole three-times-in-two-time-zones-in-one-state thing was a neat little WTF unto itself.
Of course, look at the big picture - switching time zones for some western counties at the same time now means that for programs wanting to have historically correct data back to 1970 (as the tz database tries to), there are now no less than NINE zones applying to the state. (shame that it only goes back to 1970 - some of the real WTFery happened in the 60s from what i've read - with the time zone line slowly creeping westward over the course of the decade)
And observe that a piece of software which needs to compute what time it was "X hours before Y" has to use *all* of them, and imagine just how horrible that code must be.
|
|
Page 1 of 1 (12 items)
|
|
|