def timestamp_from_datetime(dt):
    return calendar.timegm(dt.utctimetuple()) + (dt.microsecond / 1000000.0)

# Built-in timezone for when pytz isn't available:
Returns a timestamp from datetime ``dt``.
dataset/ETHPy150Open shazow/unstdlib.py/unstdlib/standard/datetime_.py/timestamp_from_datetime