I have not really done much Python but one thing that I saw immediately was that you are recreating the "months" array(not sure if it is called an array in python) multiple times. You could just make it one global variable seeing as it does not change.
I just looked up a python list. Maybe that is a better way to do it?
months=[1,2,3,4,5,6]
Just replace the numbers with the month names and use the index to get the month. You might need to add or subtract 1 to get the correct month
months[date_time - 1]
or something like that.