Compare sensor time with now in function node

A very simple question… I’m trying to call a service in Node Red, when my PC has been inactive for X seconds.

sensor.laptop_lastactive returns a value like 2022-09-07T12:16:33+00:00. Now if I want to compare that with Date() to see if the lastactive time was more than X seconds, how to do that in a function node?

Obviously I need some kind of datetime conversion in the comparison formula below.

var lastactive = msg.payload; // some other time
var now1 = new Date();
if (now1 > lastactive + 1000) {
  return [null,msg];
}

Thanks!