maybe fix countdown timezone now part 2
All checks were successful
deploy / build-and-deploy (push) Successful in 26s

This commit is contained in:
2025-11-09 14:43:42 +01:00
parent e77b386c6d
commit ac26192588

View File

@@ -7,7 +7,7 @@
let { end }: Props = $props(); let { end }: Props = $props();
const title = `Spielstart ist am ${new Date(end).toLocaleString('de-DE', { const title = `Spielstart ist am ${end.toLocaleString('de-DE', {
day: '2-digit', day: '2-digit',
month: 'long', month: 'long',
year: 'numeric', year: 'numeric',
@@ -17,7 +17,7 @@
function getUntil(): [number, number, number, number] { function getUntil(): [number, number, number, number] {
const now = new Date(); const now = new Date();
const diff = (end.getTime() - now.getTime()) / 1000; const diff = (end.getTime() - now.getTime()) / 1000 - now.getTimezoneOffset() * 60;
return [ return [
Math.floor(diff / (60 * 60 * 24)), Math.floor(diff / (60 * 60 * 24)),