import timestruct_time = time.strptime('Sun Feb 16 11:56:25 +0800 2020', '%a %b %d %H:%M:%S %z %Y')times = time.strftime('%Y-%m-%d %H:%M:%S', struct_time)print(times) # 2020-02-16 11:56:25