Skip to main content

tz_offset_from_tzinfo

No overview available.

def tz_offset_from_tzinfo(
tzinfo: datetime.tzinfo
) - > integer

Calculates the UTC offset in seconds from a given timezone object.

Parameters

NameTypeDescription
tzinfodatetime.tzinfoThe timezone information object used to determine the offset.

Returns

TypeDescription
integerThe total offset from UTC in seconds, where positive values represent time zones ahead of UTC.