Python Dates and Times in Python Let's Build a Timed Quiz App Simple Time Machine

jassim Al-Hatem
jassim Al-Hatem
3,503 Points

confused

can someone please explain to me why is it not working?

I'm lost.

time_machine.py
import datetime

starter = datetime.datetime(2015, 10, 21, 16, 29)

def delorean(num):
    return starter.replace(hour=num)

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
53,693 Points

The challenge wants you to return a datetime that is that many hours ahead from starter. So you will need to add a timedelta of hours to starter.

jassim Al-Hatem
jassim Al-Hatem
3,503 Points

I tried mate, can I get another hint. I've been slacking for the past 2 months.

jassim Al-Hatem
jassim Al-Hatem
3,503 Points

yooo nvm, I did it. I'm actually so stupid. thanks for the hint mate.