'See datetime.tzinfo.utcoffset
The is_dst parameter may be used to remove ambiguity during DST
transitions.
>>> from pytz import timezone
>>> tz = timezone(\'America/St_Johns\')
>>> ambiguous = datetime(2009, 10, 31, 23, 30)
>>> tz.utcoffset(ambiguous, is_dst=False)
datetime.timedelta(-1, 73800)
>>> tz.utcoffset(ambiguous, is_dst=True)
datetime.timedelta(-1, 77400)
>>> try:
...     tz.utcoffset(ambiguous)
... except AmbiguousTimeError:
...     print(\'Ambiguous\')
Ambiguous'

def utcoffset(self, dt, is_dst=None):

    if (dt is None):
        return None
    elif (dt.tzinfo is not self):
        dt = self.localize(dt, is_dst)
        return dt.tzinfo._utcoffset
    else:
        return self._utcoffset
