def utc_millesecs_from_epoch(for_datetime=None):
 if (not for_datetime):
  for_datetime = datetime.datetime.now()
 return (calendar.timegm(for_datetime.utctimetuple()) * 1000)

def utc_millesecs_from_epoch ( for_datetime = None ) : if ( not for_datetime ) : for_datetime = datetime . datetime . now ( ) return ( calendar . timegm ( for_datetime . utctimetuple ( ) ) * 1000 )
returns millesconds from the unix epoch in utc .