Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
In python, everything is perfectly described in the documentation :
classmethod datetime.now([tz]) : Return the current local date and time.
classmethod datetime.utcnow() : Return the current UTC date and time, with tzinfo None.
>>> import datetime
>>> datetime.datetime.now()
datetime.datetime(2012, 4, 22, 8, 51, 41, 549137)
>>> datetime.datetime.utcnow()
datetime.datetime(2012, 4, 22, 5, 51, 49, 174015)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question