code: public Date getServerDate() throws IOException {
          HttpInputStream in = get("/describe", false, false);
          String dateString = null;
          try {
              Header header = in.getResponseHeader("Date");
              if (header == null) {
                  throw new IOException("Date was not supplied in HTTP response "
                          + "header for " + m_baseURL + "describe");
              }
              dateString = header.getValue();
  
              // This is the date format recommended by RFC2616
              SimpleDateFormat format =
                      new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z",
                                           Locale.US);
              format.setTimeZone(TimeZone.getTimeZone("UTC"));
              return format.parse(dateString);
  
          } catch (ParseException e) {
              throw new IOException("Unparsable date (" + dateString
                      + ") in HTTP response header for " + m_baseURL + "describe");
          } finally {
              in.close();
          }
      }
docs: Return the current date as reported by the Fedora server.
  
  @throws IOException
  if the HTTP Date header is not provided by the server for any
  reason, or it is in the wrong format.