'datetime.time' has no 'mktime'
I think you have done
from datetime import datetime, time
instead of
import time
from datetime import datetime
so that the object called time
is actually coming from the datetime module, not the time module.