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
Asked By: Aminoff

||

Answers:

You did not import it:

from dateutil.tz import tzutc
Answered By: jojomojo
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.