maybe fix countdown timezone now part 2
All checks were successful
deploy / build-and-deploy (push) Successful in 26s
All checks were successful
deploy / build-and-deploy (push) Successful in 26s
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
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',
|
||||
month: 'long',
|
||||
year: 'numeric',
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
function getUntil(): [number, number, number, number] {
|
||||
const now = new Date();
|
||||
const diff = (end.getTime() - now.getTime()) / 1000;
|
||||
const diff = (end.getTime() - now.getTime()) / 1000 - now.getTimezoneOffset() * 60;
|
||||
|
||||
return [
|
||||
Math.floor(diff / (60 * 60 * 24)),
|
||||
|
||||
Reference in New Issue
Block a user