def DatetimeToUTCMillis(date):
  """Converts a datetime object to milliseconds since the epoch in UTC.

  Args:
    date: A datetime to convert.
  Returns:
    The number of milliseconds since the epoch, in UTC, represented by the input
    datetime.
  """
  return DatetimeToUTCMicros(date) / 1000