import re


def tstrip(timestamp):
    """
    Returns a more succinct shortened timestring by stripping off trailing
    zeros and timezone information. Also works on pd.Timedelta.
    """

    components = re.compile(r"[T\s:]00$|[\.,]0+$|([\.,]\d+)0+$|\+\d+:\d+$|^0 days ")
    timestamp = str(timestamp)

    while True:
        output = components.sub(r"\1", timestamp)
        if output == timestamp:
            return output
        timestamp = output