code: public static final String formatTime(long timestamp, boolean useIsoDateFormat) {
          BurstDateFormat[] dfs = dateformats.get();
          if (dfs == null) {
              dfs = new BurstDateFormat[useIsoDateFormat ? 2 : 1];
              dateformats.set(dfs);
          } else if (useIsoDateFormat && dfs.length == 1) {
              BurstDateFormat[] newDfs = new BurstDateFormat[2];
              newDfs[0] = dfs[0];
              dfs = newDfs;
              dateformats.set(dfs);
          }
  
          int index = useIsoDateFormat ? 1 : 0;
          BurstDateFormat df = dfs[index];
          if (df == null) {
              df = dfs[index] = new BurstDateFormat(new SimpleDateFormat(useIsoDateFormat ? "yyyy-MM-dd'T'HH:mm:ss.SSSZ" : localeDatePattern));
          }
  
          return df.format(timestamp);
      }
docs: Return the given time formatted, based on the provided format structure
  
  @param timestamp
  A timestamp as a long, e.g. what would be returned from
  <code>System.currentTimeMillis()</code>
  
  @param useIsoDateFormat
  A boolean, if true, the given date and time will be formatted in ISO-8601,
  e.g. yyyy-MM-dd'T'HH:mm:ss.SSSZ
  if false, the date and time will be formatted as the current locale,
  
  @return formated date string