import datetime print( datetime.datetime.fromtimestamp( int("1284105682") ).strftime('%Y-%m-%d %H:%M:%S') )