Shorten epoch to second precision.

Closes #4696.
This commit is contained in:
Andrew Raines 2014-01-13 19:35:13 -06:00
parent ba7699a38b
commit 158483554d
2 changed files with 4 additions and 4 deletions

View File

@ -98,7 +98,7 @@ public class RestCountAction extends AbstractCatAction {
Table getTableWithHeader(final RestRequest request) {
Table table = new Table();
table.startHeaders();
table.addCell("time(ms)", "desc:time, in milliseconds since epoch UTC, that the count was executed");
table.addCell("epoch", "desc:seconds since 1970-01-01 00:00:00, that the count was executed");
table.addCell("timestamp", "desc:time that the count was executed");
table.addCell("count", "desc:the document count");
table.endHeaders();
@ -109,7 +109,7 @@ public class RestCountAction extends AbstractCatAction {
private Table buildTable(RestRequest request, CountResponse response) {
Table table = getTableWithHeader(request);
long time = System.currentTimeMillis();
long time = System.currentTimeMillis() / 1000;
table.startRow();
table.addCell(time);
table.addCell(dateFormat.print(time));

View File

@ -81,7 +81,7 @@ public class RestHealthAction extends AbstractCatAction {
Table getTableWithHeader(final RestRequest request) {
Table t = new Table();
t.startHeaders();
t.addCell("time(ms)", "desc:time, in milliseconds since epoch UTC, that the count was executed");
t.addCell("epoch", "desc:seconds since 1970-01-01 00:00:00, that the count was executed");
t.addCell("timestamp", "desc:time that the count was executed");
t.addCell("cluster", "desc:cluster name");
t.addCell("status", "desc:health status");
@ -100,7 +100,7 @@ public class RestHealthAction extends AbstractCatAction {
private DateTimeFormatter dateFormat = DateTimeFormat.forPattern("HH:mm:ss");
private Table buildTable(final ClusterHealthResponse health, final RestRequest request) {
long time = System.currentTimeMillis();
long time = System.currentTimeMillis() / 1000;
Table t = getTableWithHeader(request);
t.startRow();
t.addCell(time);