code: public static String calendarToString(GregorianCalendar cal) {
          String s = String.format("%1$tFT%1$tT.%1$tL%1$tz", cal);
          /* s is almost right, but is missing the colon in the offset */
          assert Pattern.matches(".*[-+][0-9]{4}$", s);
          int n = s.length();
          return s.substring(0, n-2) + ":" + s.substring(n-2);
      }
docs: Return a String suitable for use as an edn {@code #inst}, given
  a {@link GregorianCalendar}.
  @param cal must not be null.
  @return an RFC3339 compatible string.