Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #10: Date Time Calculations

ademinaction
6 - Meteoroid
Spoiler
SPOILER

My Solution:

jvansistine
9 - Comet

Probably a bunch of ways to do this, but here's mine.

Stevej028
7 - Meteor
Spoiler
image.png
AbbieRoss-Carter
8 - Asteroid
Spoiler
 
Inactive User
Not applicable
 
LordGaia
6 - Meteoroid

My solution attached

kaianderson
8 - Asteroid
 
Inactive User
Not applicable
 
KolsumaAktar
8 - Asteroid

solutions attached

Illya
8 - Asteroid

My solution. Ah a trick question!

ATTEMPTING THIS CHALLENGE? STOP... READ THIS FIRST

The Input 'Time_Now' is different to the output answer 'Time_Now' by 41 seconds.

INPUT TIME_NOW:       2014-07-14 08:24:35

OUTPUT TIME_NOW:   2014-07-14 08:25:16

 

I'd like to say this didn't trip me up but it did.

I solved this quickly using modulo and felt like a genius... Checked the answer doubted myself.

Did it again in a much more complicated way, got the same answer... at this point I should have smelled a fish however I... doubted myself for a second time.

Spent too long working through the logic and wondering if time and space were at fault or I had gone mad before noticing the difference in the answer.

Cursed, waved my fist in the air repeatedly and vowed to check such things in future.

Forum Mods: If you are aware of a problem with a challenge could you please change the start file? Or at least put a warning in the Original Post.

Several people have reported this over the past three years and it's still tripping people up. Hopefully this isn't a thing in future challenges?