fix: save timestamps correctly

This commit is contained in:
2018-11-02 12:25:22 -07:00
parent 420c845cbc
commit 20bb9460d1

View File

@@ -26,8 +26,8 @@ export default async function(indexName, opts = {}) {
transponder: rec[0], transponder: rec[0],
callsign: rec[1], callsign: rec[1],
origin_country: rec[2], origin_country: rec[2],
time_position: rec[3], time_position: new Date(rec[3] * 1000),
last_contact: rec[4], last_contact: new Date(rec[4] * 1000),
location: rec[5] && rec[6] ? `${rec[6]},${rec[5]}` : null, location: rec[5] && rec[6] ? `${rec[6]},${rec[5]}` : null,
baro_altitude: rec[7], baro_altitude: rec[7],
geo_altitude: rec[13], geo_altitude: rec[13],