def epoch_for_datetime(dt):

    epoch = datetime.datetime(1970, 1, 1, tzinfo=pytz.utc)
    return int((dt - epoch).total_seconds())
converts a given datetime.datetime to UNIX epoch time in seconds
dataset/ETHPy150Open ahmetalpbalkan/personal-dashboard/tasks/__init__.py/epoch_for_datetime