def parse_z(cls, offset):
        """ Parse %z offset into `timedelta` """
        assert len(offset) == 5, 'Invalid offset string format, must be "+HHMM"'
        return timedelta(hours=int(offset[:3]), minutes=int(offset[0] + offset[3:]))
def parse_z ( cls , offset ) : assert len ( offset ) == 5 , 'Invalid offset string format, must be "+HHMM"' return timedelta ( hours = int ( offset [ : 3 ] ) , minutes = int ( offset [ 0 ] + offset [ 3 : ] ) )
Parse %z offset into `timedelta`