(dtm)
return int(calendar.timegm(dtm.timetuple()) * 1000 +
               dtm.microsecond / 1000)
Convert datetime to milliseconds since epoch UTC.
Convert datetime to milliseconds since epoch UTC.
Convert datetime to milliseconds since epoch UTC .
def _datetime_to_millis(dtm):
    """Convert datetime to milliseconds since epoch UTC."""
    if dtm.utcoffset() is not None:
        dtm = dtm - dtm.utcoffset()
    return int(calendar.timegm(dtm.timetuple()) * 1000 +
               dtm.microsecond / 1000)
def _datetime_to_millis ( dtm ) : if dtm . utcoffset ( ) is not None : dtm = dtm - dtm . utcoffset ( ) return int ( calendar . timegm ( dtm . timetuple ( ) ) * 1000 + dtm . microsecond / 1000 )