def _millis(when):
 micros = _microseconds_from_datetime(when)
 return (micros // 1000)

def _millis ( when ) : micros = _microseconds_from_datetime ( when ) return ( micros // 1000 )
convert a zone-aware datetime to integer milliseconds .