Why is my time printed not correspond with actual time?


from datetime import datetime
now = datetime.now()

print '%s:%s:%s' % (now.hour, now.minute, now.second)

The outcome is 9:11:44



When Codecademy made this lesson, they set the datetime to the time of when this lesson was created/when the datetime was setup not the actual time of when the user completes the lesson. Nothing wrong with your code though so no worries! :smiley:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.