def datetime_to_timestamp(dateTime):
    diff = as_utc(dateTime) - epoch_utc
    return diff.total_seconds()
Converts a datetime.datetime to a UTC timestamp.
dataset/ETHPy150Open gbeced/pyalgotrade/pyalgotrade/utils/dt.py/datetime_to_timestamp