diff --git a/routes/ping.js b/routes/ping.js index 5ccce0b..d98000c 100644 --- a/routes/ping.js +++ b/routes/ping.js @@ -1,5 +1,6 @@ let express = require("express"); let ipaddr = require("ipaddr.js"); +let moment = require("moment"); let db = require("../libs/Database").instance(); let router = express.Router(); @@ -35,9 +36,9 @@ router.get("/:fqdn", (req, res) => { if (!d) return res.status(404).send("Unknown FQDN"); res.send([ d.ipv4 ? d.ipv4 : "0.0.0.0", - d.ipv4LastPing, + moment(d.ipv4LastPing).toISOString(), d.ipv6 ? d.ipv6 : "::", - d.ipv6LastPing, + moment(d.ipv6LastPing).toISOString(), ].reduce((a, b) => a + "\n" + b)); }); });