const data = value;
var days = 0, hours = 0, minutes = 0, seconds = 0;

const daysMatch = data.match(/(\d+)\s+Days?/i);

if (daysMatch) {
	days = parseInt(daysMatch[1], 10);
	data = data.replace(daysMatch[0], "").trim();
}

const timeMatch = data.match(/(\d+):(\d+):(\d+)/);

if (!timeMatch) {
	throw "Unknown uptime format";
}

hours = parseInt(timeMatch[1], 10);
minutes = parseInt(timeMatch[2], 10);
seconds = parseInt(timeMatch[3], 10);

return days * 86400 + hours * 3600 + minutes * 60 + seconds;