class tzutc(datetime.tzinfo): (source)
This is a tzinfo object that represents the UTC time zone. **Examples:** .. doctest:: >>> from datetime import * >>> from dateutil.tz import * >>> datetime.now() datetime.datetime(2003, 9, 27, 9, 40, 1, 521290) >>> datetime.now(tzutc()) datetime.datetime(2003, 9, 27, 12, 40, 12, 156379, tzinfo=tzutc()) >>> datetime.now(tzutc()).tzname() 'UTC' .. versionchanged:: 2.7.0 ``tzutc()`` is now a singleton, so the result of ``tzutc()`` will always return the same object. .. doctest:: >>> from dateutil.tz import tzutc, UTC >>> tzutc() is tzutc() True >>> tzutc() is UTC True
Method | __eq__ |
Undocumented |
Method | __ne__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | dst |
Undocumented |
Method | fromutc |
Fast track version of fromutc() returns the original ``dt`` object for any valid :py:class:`datetime.datetime` object. |
Method | is |
Whether or not the "wall time" of a given datetime is ambiguous in this zone. |
Method | tzname |
Undocumented |
Method | utcoffset |
Undocumented |
Class Variable | __hash__ |
Undocumented |
Fast track version of fromutc() returns the original ``dt`` object for any valid :py:class:`datetime.datetime` object.