diff = 60 * 60 * 24
yesterday = datetime(hour=23, minute=30, *datetime.fromtimestamp(calendar.
    timegm(datetime.today().utctimetuple()) - diff).utctimetuple()[:3])
print(yesterday)
Python устанавливает час даты и времени как определенное время