Buenos dias,
Estoy tratando de poner en mi sitio web un temporizador, que se reinicia todos los días a las 00:00 UTC +1 (Roma) y comienza de nuevo. El hecho es que es más complejo que esto... El temporizador debe comenzar a las 00:00. En el sitio web, las personas verán 23:00:00 restantes. Durante la hora restante hasta las 00:00, desde las 23:00 hasta las 00:00, en el sitio web, las personas verán "Los resultados se publicarán dentro de una hora, el juego se reiniciará en "cuenta regresiva de una hora"" y a las 00: 00 todo se reiniciará.
el código JS que tengo de mi plantilla es:
if (plugins.countDown.length) { var d; for (i = 0; i < plugins.countDown.length; i++) { var countDownItem = plugins.countDown[i], d = new Date(), time = countDownItem.getAttribute('data-time'), type = countDownItem.getAttribute('data-type'), // {until | since} format = countDownItem.getAttribute('data-format') ? countDownItem.getAttribute('data-format') : 'YYYY/MM/DD hh:mm:ss', expiryText = countDownItem.getAttribute('data-expiry-text') ? countDownItem.getAttribute('data-expiry-text') : 'Countdown finished', labels = countDownItem.getAttribute('data-labels') ? countDownItem.getAttribute('data-labels') : '', layout = countDownItem.getAttribute('data-layout') ? countDownItem.getAttribute('data-layout') : '{yn} {yl} {on} {ol} {dn} {dl} {hnn}{sep}{mnn}{sep}{snn}', settings = []; if (labels.length > 0) { settings['labels'] = JSON.parse(labels); } d.setTime(Date.parse(time)).toLocaleString(); settings[type] = d; settings['expiryText'] = expiryText; settings['format'] = format; settings['alwaysExpire'] = true; settings['padZeroes'] = true; settings['layout'] = layout; settings['onExpiry'] = function () { this.classList += ' countdown-expired'; this.innerHtml = expiryText; }; $(countDownItem).countdown(settings); } }solo una simple cuenta regresiva.