import time


def timestamp_to_time(timestamp):
    """
    时间戳转时间字符串
    :param timestamp: 时间戳
    :return: 时间字符串
    """
    x = time.localtime(timestamp)
    return time.strftime('%Y-%m-%d %H:%M:%S', x)