code: public static String toISO8601(Date pDate,TimeZone pTimeZone) {
          SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
          dateFormat.setTimeZone(pTimeZone);
          String ret = dateFormat.format(pDate);
          ret = ret.replaceAll("\\+0000$", "Z");
          return ret.replaceAll("(\\d\\d)$", ":$1");
      }
docs: Convert a given date to an ISO-8601 compliant string
  representation for a given timezone
  
  @param pDate date to convert
  @param pTimeZone timezone to use
  @return the ISO-8601 representation of the date