Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.13 KB

api.rst

File metadata and controls

39 lines (26 loc) · 1.13 KB

pytz_deprecation_shim

API Reference

UTC

The UTC singleton (with an alias at utc) is a shim class wrapping either datetime.timezone.utc or dateutil.tz.UTC.

timezone(key)

fixed_offset_timezone(offset)

build_tzinfo(zone, fp)

wrap_zone(tz, key=...)

Exceptions

PytzUsageWarning

pytz shim exceptions

These exceptions are intended to mirror at least some of pytz's exception hierarchy. The shim classes are designed in such a way that the exception classes they raise can be caught either by catching the value in pytz_deprecation_shim or the equivalent exception in pytz (the actual exception type raised will depend on whether or not pytz has been imported, but the value will either be one of the shim exceptions or a subclass of both the shim exception and its pytz equivalent).

InvalidTimeError

AmbiguousTimeError

NonExistentTimeError

UnknownTimeZoneError