How to use tzutc()
Question:
What am I missing, how do I get this function to work?
import dateutil.parser
import datetime
my_date = datetime.datetime(2000, 1, 1, 0, 0, 0, 000000, tzinfo=tzutc())
print(my_date)
Gives me the error:
NameError: name 'tzutc' is not defined
Answers:
You did not import it:
from dateutil.tz import tzutc
What am I missing, how do I get this function to work?
import dateutil.parser
import datetime
my_date = datetime.datetime(2000, 1, 1, 0, 0, 0, 000000, tzinfo=tzutc())
print(my_date)
Gives me the error:
NameError: name 'tzutc' is not defined
You did not import it:
from dateutil.tz import tzutc