I am trying to come up with the epoch of the start of the day (12AM midnight UTC) in Python. I found this snippet:
today = datetime.date.today()
time.mktime((today.year, today.month, today.day, 0, 0, 0, 0, 0, 0))
but the resulting epoch leads to today's date at 5AM. The reason I need this is because I have a script executing a SQL command that needs to filter using epoch time (for some reason, casting or extracting an epoch through native SQL results in my query finishing in 5 minutes, as compared to 12 seconds). I'm guessing that the code snippet I put above uses my local machine time.