icalendar.compatibility module#

This module contains compatibility code for older Python versions.

class icalendar.compatibility.ZoneInfo#

Bases: tzinfo

classmethod clear_cache(*, only_keys=None)#

Clear the ZoneInfo cache.

dst(dt, /)#

Retrieve a timedelta representing the amount of DST applied in a zone at the given datetime.

classmethod from_file(file_obj, /, key=None)#

Create a ZoneInfo file from a file object.

fromutc(object, /)#

Given a datetime with local time in UTC, retrieve an adjusted datetime in local time.

key#
classmethod no_cache(key)#

Get a new instance of ZoneInfo, bypassing the cache.

tzname(dt, /)#

Retrieve a string containing the abbreviation for the time zone that applies in a zone at a given datetime.

utcoffset(dt, /)#

Retrieve a timedelta representing the UTC offset in a zone at the given datetime.