How to sort array of dates python. sort () but getting wrong results