def datetime_to_epoch(dt):
    td = dt - datetime.datetime(1970, 1, 1)
    return td.days * 86400 + td.seconds + td.microseconds / 1E6
dataset/ETHPy150Open spotify/luigi/test/postgres_test.py/datetime_to_epoch/original