There is a timer of several dates on JS and there is a check where the current time is compared with the given one:
var timeEnds = [ new Date(date.getFullYear(), 6 - 1, 12, 23, 00), // new Date(год, месяц - 1, день, час, минуты); new Date(date.getFullYear(), 6 - 1, 13, 5, 00), new Date(date.getFullYear(), 6 - 1, 13, 19, 30), new Date(date.getFullYear(), 6 - 1, 13, 21, 30), new Date(date.getFullYear(), 6 - 1, 13, 23, 00), new Date(date.getFullYear(), 6 - 1, 14, 4, 00), new Date(date.getFullYear(), 6 - 1, 14, 19, 00), new Date(date.getFullYear() + 1, 6 - 1, 12, 23, 00) ]; ... var timeIndex = 0; // Индекс массива с датами var nowdate = new Date(); // Текущее время for (var i = 0; i < timeEnds.length; i++) { // Цикл по массиву дат if (nowdate > timeEnds[timeIndex]) { // Проверка на наступление даты из массива timeIndex++; // Переходим к следующей дате } else { break; } } The fact is that the current time of the user installed on the PC is compared. That is, the time zone is not taken into account or the situation when the user does not have the correct date at all. How to solve this problem, maybe there are some libraries or a site that can parse?