def filter_parsedate(val):
 return datetime.fromtimestamp(mktime(parsedate(val)))

def filter_parsedate ( val ) : return datetime . fromtimestamp ( mktime ( parsedate ( val ) ) )
attempts to parse a date according to the rules in rfc 2822 .