import time


def _local_time_offset(t=None):
    """Return offset of local zone from GMT, taking daylight savings into acount."""
    t = time.time()

    if time.localtime(t).tm_isdst and time.daylight:
        return time.altzone
    else:
        return time.timezone