Ich zähle bis zur Sonnenfinsternis mit jquery countdown.js. Auf meinem Desktop zählt alles richtig. Auf Handy (Android) ist der Countdown eine Stunde voraus. Auf dem Handy anderer Leute zeigt der Countdown 0 Stunden an. Was mache ich falsch? Verfolge ich nicht die Zeitzone? Sollte das eine Rolle spielen? Der Countdown läuft bis zur Sonnenfinsternis (in weniger als 4 Stunden), sodass ich schnell Hilfe gebrauchen kann!javascripts/jquery countdown geben falsche Stunden auf Handy
var date = new Date("2017-08-21T13:18:00"); //1:18 p.m. EST
$("#dayElem")
.countdown(date, function(event) {
if (event.strftime('%-D') < 10) {
$(this).text('0' +
event.strftime('%-D')
);
} else {
$(this).text(
event.strftime('%-D')
);
}
});
$("#hourElem")
.countdown(date, function(event) {
if (event.strftime('%-H') < 10) {
$(this).text('0' +
event.strftime('%-H')
);
} else {
$(this).text(
event.strftime('%-H')
);
}
});
$("#minuteElem")
.countdown(date, function(event) {
if (event.strftime('%-M') < 10) {
$(this).text('0' +
event.strftime('%-M')
);
} else {
$(this).text(
event.strftime('%-M')
);
}
});
$("#secondElem")
.countdown(date, function(event) {
if (event.strftime('%-S') < 10) {
$(this).text('0' +
event.strftime('%-S')
);
} else {
$(this).text(
event.strftime('%-S')
);
}
});