def get_sec_since_midnight(date):
    midnight = date.replace(hour=0, minute=0, second=0, microsecond=0)
    delta = date - midnight
    return delta.seconds
Return seconds since midnight
dataset/ETHPy150Open Crystalnix/omaha-server/omaha_server/omaha/utils.py/get_sec_since_midnight