js alarm go to url
function goUrlAlarm(time = '01:02:03', url) {
const today = new Date();
const month = today.getUTCMonth() > 9 ? today.getUTCMonth() : '0' + today.getUTCMonth();
const day = today.getUTCDate() > 9 ? today.getUTCDate() : '0' + today.getUTCDate();
const year = today.getUTCFullYear();
const second = today.getSeconds();
const minute = today.getMinutes();
const hour = today.getHours();
const x = new Date(`${year}-${month}-${day}T${time}`);
const y = new Date(`${year}-${month}-${day}T${hour}:${minute}:${second}`);
setTimeout(function () {
location.href = url;
}, x-y);
}
goUrlAlarm('12:00:00', 'http://google.com');