Source of datetime.now() data?


#1

Hey guys,
Printed off datetime.now and came up with the time in my previous timezone
despite having changed it in my system. Was curious as to where Python (or
CodeAcademy?) is retrieving this info.

Thx merry christmas guis


#2

One would have to try it in an exercise IDE, but in the l a b it shows me my system time.

from datetime import datetime
now = datetime.now()
utcnow = datetime.utcnow()
print now
print utcnow

Output

2015-12-22 21:26:26.238000
2015-12-23 04:26:26.241000

which is correct, I believe. MST is UTC -7:00.


#3