icalendar.timezone.zoneinfo module#

Use zoneinfo timezones

class icalendar.timezone.zoneinfo.ZONEINFO[source]#

Bases: TZProvider

Provide icalendar with timezones from zoneinfo.

create_timezone(tz: Timezone.Timezone) tzinfo[source]#

Create a timezone from the given information.

fix_rrule_until(rrule: rrule, ical_rrule: prop.vRecur) None[source]#

Make sure the until value works for the rrule generated from the ical_rrule.

knows_timezone_id(tzid: str) bool[source]#

Whether the timezone is already cached by the implementation.

localize(dt: datetime, tz: ZoneInfo) datetime[source]#

Localize a datetime to a timezone.

localize_utc(dt: datetime) datetime[source]#

Return the datetime in UTC.

name = 'zoneinfo'#
timezone(name: str) tzinfo | None[source]#

Return a timezone with a name or None if we cannot find it.

uses_pytz() bool[source]#

Whether we use pytz.

uses_zoneinfo() bool[source]#

Whether we use zoneinfo.

utc = zoneinfo.ZoneInfo(key='UTC')#