Convert Date Time to Unix time

Hi all

I have a message output being read from a CSV file that is in this format "GPS Time: "Sun Dec 01 08:50:14 PST 2019".Does anybody know how to convert it to a Unix time.
Thanks
Dennis Mitchell

In your other post you showed it already converted
GPS Time: 1577775035485
Since you already have an active thread discussing how to format the data for influx it would really be better to keep it all in one thread.

Hi Colin

I thought I had it converted using the change node using the time stamp output but this is the current time not the time from my data.

Let's continue this back in the original thread.

I have an array from a database with UNIX/epoch time format and I use this to convert all the timestamps in the array:

var i;
for (i = 0; i <msg.payload.length; i++) {

var now = new Date(msg.payload[i].TIMESTAMP).toLocaleString("en-GB");
msg.payload[i].TIMESTAMP = now;

}

return msg;

So new Date().toLocaleString("en-GB"); works for me.