code: private long getCommitTimestamp(JSONObject jsonItem) {
          if (jsonItem.get("timestamp") != null) {
              return (Long) jsonItem.get("timestamp");
          } else if (jsonItem.get("date") != null) {
              String dateString = (String) jsonItem.get("date");
              try {
                  return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX").parse(dateString).getTime();
              } catch (java.text.ParseException e) {
                  // Try an alternate date format...looks like this one is used by Git
                  try {
                      return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(dateString).getTime();
                  } catch (java.text.ParseException e1) {
                      LOG.error("Invalid date string: " + dateString, e);
                  }
              }
          }
          return 0;
      }
docs: //// Helpers