summaryrefslogtreecommitdiff
path: root/src/components/ListItem.js
diff options
context:
space:
mode:
authorErnst Widerberg <ernst@sunet.se>2022-04-25 10:51:40 +0200
committerErnst Widerberg <ernst@sunet.se>2022-04-25 10:51:40 +0200
commitb5c603f9d4fd4d1f96a3f7e529295b4cfb624f5d (patch)
tree5551f7016d0497b2d0dbf472f751e3bdec0a885f /src/components/ListItem.js
parentd3c1fae9851a15b60febf26bbf588412782da6c4 (diff)
Convert timestamp to JS Date when fetching
Diffstat (limited to 'src/components/ListItem.js')
-rw-r--r--src/components/ListItem.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/ListItem.js b/src/components/ListItem.js
index dcafe24..43a5513 100644
--- a/src/components/ListItem.js
+++ b/src/components/ListItem.js
@@ -3,6 +3,8 @@ import React from "react";
import Button from "@mui/material/Button";
import Card from "@mui/material/Card";
+import dateFormat from "dateformat";
+
import { resultClassName } from "../util";
class ListItem extends React.Component {
@@ -20,7 +22,9 @@ class ListItem extends React.Component {
}}
onClick={() => (window.location = `/${this.props._id}`)}
>
- <td>{this.props.timestamp_in_utc}</td>
+ <td>
+ {dateFormat(this.props.timestamp_in_utc, "isoUtcDateTime")}
+ </td>
<td>
{this.props.ip}:{this.props.port}
</td>