I\'m trying to get my head around the datetime module. I know the time now as an epoch and the time an event last happened (as an epoch time). What I need to do is figure
You can use this code:
import time seconds_of_day = 24 * 60 * 60 # 86400 last_midnight = (round(time.time()) // seconds_of_day) * seconds_of_day yesterday_last_midnight = last_midnight - seconds_of_day