I wanted to convert a date from git log but I'm trying to match the date from the documentation of datetime but it never matches.
from datetime import datetime
receivedDate = (commits[0]['Date']) #receiving date
print(receivedDate) #e.g Thu Jan 14 12:47:30 2016 +0100
receivedDate = ' '.join(receivedDate.split(' ')[:-1]) #removing +0100
date = datetime.strptime(receivedDate,'%a %b %d %H:%M:%S %Y')
ValueError: time data 'Thu Jan 14 12:47:30 2016' does not match format '%a %b %d %H:%M:%S %Y'
I've also tried by keeping '+0100' and added %z, but it doesn't work either. It runs with python 3.6.
Thanks for help or any idea :)