def time_zone(t):
    if t.tm_isdst == 1 and time.daylight == 1:
        tz_sec = time.altzone
        tz_name = time.tzname[1]
    else:
        tz_sec = time.timezone
        tz_name = time.tzname[0]

    if tz_sec > 0:
        tz_sign = '-'
    else:
        tz_sign = '+'

    tz_offset = '%s%02d%02d' % (tz_sign, abs(tz_sec)//3600, abs(tz_sec//60)%60)
    return (tz_offset, tz_name)