def _return_parsed_timezone_results(result, timezones, box, tz, name):
if tz is not None:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>tz_results = np.array([Timestamp(res).tz_localize(zone) for res, zone<EOL>in zip(result, timezones)])<EOL>if box:<EOL><INDENT>from pandas import Index<EOL>return Index(tz_results, name=name)<EOL><DEDENT>return tz_results<EOL>
Return results from array_strptime if a %z or %Z directive was passed.

Parameters
----------
result : ndarray
    int64 date representations of the dates
timezones : ndarray
    pytz timezone objects
box : boolean
    True boxes result as an Index-like, False returns an ndarray
tz : object
    None or pytz timezone object
name : string, default None
    Name for a DatetimeIndex

Returns
-------
tz_result : ndarray of parsed dates with timezone
    Returns:

    - Index-like if box=True
    - ndarray of Timestamps if box=False