How can I change an EPOCH time starting on a particular day at a particular time to that same day but midnight?

Viewed 18

I have the following code below, which converts a human-readable date into an EPOCH datetime. However, the EPOCH date time is for 2022/09/15 4pm to 2022/09/16 4pm. Is it possible to change it so that it produces the EPOCH for 2022/09/15 12:00am to 2022/09/16 12:00am?

import datetime as dt  

(dt.datetime(2022, 9, 15).timestamp(), dt.datetime(2022, 9, 16).timestamp()-1)

Output: (1663171200.0, 1663257599.0)

0 Answers
Related