def date_object_to_rfc3339(date):
  """Converts a datetime object to a RFC3339 date string.

  Args:
    date: Date object (e.g datetime.datetime(2017, 12, 27 , 0, 0, 0, 0)).

  Returns:
    Corresponding RFC3339 date string (e.g: 2017-12-27T00:00:00Z).
  """
  return date.strftime('%Y-%m-%dT%H:%M:%SZ')