Fix: Angriffszeit wurde 2h in die Zukunft angezeigt (lokale statt UTC-Zeit) #29
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DasAoD/sfguildsv2!29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-attack-time-timezone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
toLocaleString('de-DE', {...})ohne explizitetimeZonerechnet den Unix-Timestamp in die Zeitzone des Browsers um (CEST = UTC+2 im Sommer). Der Timestamp ausguild_battle_time.rsist UTC, und das Spiel selbst zeigt Kampfzeiten auch in UTC an (siehe Kommentar// Das Spiel zeigt UTC-Zeit anin der.rs-Datei) — die Seite zeigte also durchgängig eine um 2h zu späte Zeit im Vergleich zu dem, was das Spiel anzeigt.Fix
timeZone: 'UTC'explizit gesetzt, Label von „Uhr" auf „UTC" geändert, damit klar ist, welche Zeitzone angezeigt wird.🤖 Generated with Claude Code
toLocaleString('de-DE', {...}) without an explicit timeZone converts the Unix timestamp to the browser's local timezone (CEST = UTC+2 in summer). guild_battle_time.rs's timestamp is UTC, and the game itself displays combat times in UTC too (see the comment in that file) - so the page was showing a time 2h later than what the game shows. Force timeZone: 'UTC' and label the result "UTC" instead of "Uhr" to match.