code: public static String formatIsoDate(ZonedDateTime value) {
          if (value == null) {
              return null;
          }
  
          // to match the format we get from Python's .isoformat(), we don't include second fraction if it's zero
          if (value.getNano() == 0) {
              return ISO_DATETIME_FORMAT_NO_SECOND_FRACTION.format(value);
          }
  
          return ISO_DATETIME_FORMAT.format(value);
      }
docs: Formats a date time as ISO8601 with microsecond precision and offset, e.g. "2014-10-03T09:41:12.790123+02:00"