From 20bb9460d17af65950bb5beffab3a3fc6a075a9a Mon Sep 17 00:00:00 2001 From: joe fleming Date: Fri, 2 Nov 2018 12:25:22 -0700 Subject: [PATCH] fix: save timestamps correctly --- src/index.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.mjs b/src/index.mjs index 7156c51..280a8cf 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -26,8 +26,8 @@ export default async function(indexName, opts = {}) { transponder: rec[0], callsign: rec[1], origin_country: rec[2], - time_position: rec[3], - last_contact: rec[4], + time_position: new Date(rec[3] * 1000), + last_contact: new Date(rec[4] * 1000), location: rec[5] && rec[6] ? `${rec[6]},${rec[5]}` : null, baro_altitude: rec[7], geo_altitude: rec[13],