icalendar.timezone.zoneinfo module#

Use zoneinfo timezones

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

Bases: TZProvider

Provide icalendar with timezones from zoneinfo.

create_timezone(tz)[source]#

Create a timezone from the given information.

fix_rrule_until(rrule, ical_rrule)[source]#

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

Return type:

None

knows_timezone_id(tzid)[source]#

Whether the timezone is already cached by the implementation.

Return type:

bool

localize(dt, tz)[source]#

Localize a datetime to a timezone.

Return type:

datetime

localize_utc(dt)[source]#

Return the datetime in UTC.

Return type:

datetime

name = 'zoneinfo'#
timezone(name)[source]#

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

Return type:

Optional[tzinfo]

uses_pytz()[source]#

Whether we use pytz.

Return type:

bool

uses_zoneinfo()[source]#

Whether we use zoneinfo.

Return type:

bool

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