def clean_timestamp(timestamp, format=False):
    """
    used to remove unwanted characters from the overly long timestamp in the json data of a tweet
    eg: timestamp comes in as 'Thu Dec 17 13:44:24 +0000 2020' and for now we only want 'Thu Dec 17 13:44'
    """

    cleaned_timestamp_list = str(timestamp).split(' ')[0:4]

    # remove the seconds from the actual time part of the string
    cleaned_timestamp_list[3] = cleaned_timestamp_list[3][0:5]

    # join them back into a string
    cleaned_timestamp = ' '.join(cleaned_timestamp_list)

    return cleaned_timestamp