def _getTimezoneOffsetTest(self, tzname, daylightOffset, standardOffset):
        """
        Verify that L{getTimezoneOffset} produces the expected offset for a
        certain timezone both when daylight saving time is in effect and when
        it is not.

        @param tzname: The name of a timezone to exercise.
        @type tzname: L{bytes}

        @param daylightOffset: The number of seconds west of UTC the timezone
            should be when daylight saving time is in effect.
        @type daylightOffset: L{int}

        @param standardOffset: The number of seconds west of UTC the timezone
            should be when daylight saving time is not in effect.
        @type standardOffset: L{int}
        """
        if getattr(time, 'tzset', None) is None:
            raise unittest.SkipTest(
                "Platform cannot change timezone, cannot verify correct "
                "offsets in well-known timezones.")

        originalTimezone = os.environ.get('TZ', None)
        try:
            os.environ['TZ'] = tzname
            time.tzset()

            # The behavior of mktime depends on the current timezone setting.
            # So only do this after changing the timezone.

            # Compute a POSIX timestamp for a certain date and time that is
            # known to occur at a time when daylight saving time is in effect.
            localDaylightTuple = (2006, 6, 30, 0, 0, 0, 4, 181, 1)
            daylight = time.mktime(localDaylightTuple)

            # Compute a POSIX timestamp for a certain date and time that is
            # known to occur at a time when daylight saving time is not in
            # effect.
            localStandardTuple = (2007, 1, 31, 0, 0, 0, 2, 31, 0)
            standard = time.mktime(localStandardTuple)

            self.assertEqual(
                (self.flo.getTimezoneOffset(daylight),
                 self.flo.getTimezoneOffset(standard)),
                (daylightOffset, standardOffset))
        finally:
            if originalTimezone is None:
                del os.environ['TZ']
            else:
                os.environ['TZ'] = originalTimezone
            time.tzset()

        Verify that L{getTimezoneOffset} produces the expected offset for a
        certain timezone both when daylight saving time is in effect and when
        it is not.

        @param tzname: The name of a timezone to exercise.
        @type tzname: L{bytes}

        @param daylightOffset: The number of seconds west of UTC the timezone
            should be when daylight saving time is in effect.
        @type daylightOffset: L{int}

        @param standardOffset: The number of seconds west of UTC the timezone
            should be when daylight saving time is not in effect.
        @type standardOffset: L{int}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_log.py