from datetime import datetime
ntp_time = datetime.strptime(time_str_from_ntp, '%a %b %y %H:%M:%S')
formatted_time = datetime.strftime(ntp_time, '%Y-%m-%d %H:%M:%S')
Convert date retrieved from ntp server with python