import time


def secs_to_datetime(secs):
    """
    Convert seconds to timestamp
    Return timestamp (2020-05-19 09:12:30)
    """

    try:
        time_struct = time.localtime(secs)
        timestamp   = time.strftime("%Y-%m-%d %H:%M:%S", time_struct)

    except Exception as err:
        timestamp = "0000-00-00 00:00:00"

    return timestamp