6
Jul 25 '16
That's not Javascript, it's PHP. Silly tag.
3
u/LePhil Jul 25 '16
You're right, of course. I'm using JS, but said apprentice used PHP at the time.
7
u/auxiliary-character Jul 25 '16
Something tells me he's the sort of person that would write vulnerable database code.
4
u/Prom3th3an Aug 03 '16
And it'd be full of
// Rewrite this before deploying to production
with no actual stopship keywords that the release build scripts recognize, and no entries in the bug tracker.
33
18
Jul 25 '16
this is amazing
24
u/fukitol- Jul 26 '16
And I love that it's just "during winter time" like the idea of this being DST related was never even considered. Time just goes wonky "during winter"
24
u/RoLoLoLoLo Jul 26 '16
It's more likely OP is from a country where DST and non-DST is called summer time and winter time.
7
13
4
Jul 25 '16
Things I love: moving to a country that doesn't do DST changes, which I assume (hope?) was the reasoning behind this
2
u/Prom3th3an Aug 03 '16
Is the server at least a real server, so they can set it on UTC without screwing up anyone's desktop clock?
1
Sep 06 '16
I know nothing about coding, explain please
1
u/naphini Oct 24 '16
It's a line of code that sets the clock back an hour to account for daylight savings time, but instead of writing a conditional to automatically do it on the correct days, it requires the programmer to manually edit the code twice a year to change it back and forth.
101
u/LePhil Jul 25 '16
Context: An apprentice wrote this code 2 years ago. Today, while sharing bad code with other teams, a colleague brought up this gem. Couldn't believe it until he showed it to us.
My suggestion was to write a cronjob which greps for the line and removes/adds the "// " every 6 months, just to stick with the hilarity of the whole situation.