use of org.opengrok.indexer.configuration.IndexTimestamp in project OpenGrok by OpenGrok.
the class SystemController method getIndexTime.
@GET
@Path("/indextime")
@Produces(MediaType.APPLICATION_JSON)
public String getIndexTime() throws JsonProcessingException {
Date date = new IndexTimestamp().getDateForLastIndexRun();
ObjectMapper mapper = new ObjectMapper();
// StdDateFormat is ISO8601 since jackson 2.9
mapper.setDateFormat(new StdDateFormat().withColonInTimeZone(true));
return mapper.writeValueAsString(date);
}
Aggregations