Skip to content

Implement: libowski-bot-fix-vikes-timezone.md - #6

Merged
emb417 merged 1 commit into
mainfrom
vault-spec/libowski-bot-fix-vikes-timezone
Sep 13, 2026
Merged

emb417 merged 1 commit into
mainfrom
vault-spec/libowski-bot-fix-vikes-timezone

Conversation

@emb417

@emb417 emb417 commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Auto-generated from vault spec notes/libowski-bot-fix-vikes-timezone.md.

TV Scheduls use incorrect timezone

The Vikes TV Schedule is showing the wrong timezone. It should be PST, it looks like GMT currently.


Expanded Spec

Problem

The view-vikes-tv command extracts game start times from JSON-LD SportsEvent objects found on https://www.vikings.com/schedule/. The startDate property in these objects is currently parsed as GMT (likely due to missing offset information or default new Date() behavior), causing game times to appear incorrectly for users expecting Pacific Standard Time (PST).

Acceptance Criteria

  • Adjust the timestamp processing in src/commands/view-vikes-tv.js to correctly convert or display game times in PST/PDT.
  • Ensure that the resulting Discord embed reflects the correct local time for the target timezone.
  • Verify that the conversion handles Daylight Savings Time correctly (or defaults to standard practice for local sports schedules).

Notes for implementer

  • The startDate field in JSON-LD SportsEvent schemas is typically an ISO 8601 string. If the string lacks an offset (e.g., 2023-10-01T10:00:00), JavaScript’s Date constructor treats it as UTC.
  • Consider using Intl.DateTimeFormat or a lightweight library like date-fns-tz to format the date string specifically for the America/Los_Angeles timezone before passing it to the EmbedBuilder.
  • Since the bot's infrastructure currently relies on standard Date objects, ensure the timezone conversion happens immediately before stringifying the date for the Discord UI.

@emb417 emb417 added the patch Patch-level semver bump label Sep 13, 2026
@emb417
emb417 merged commit 804b9e0 into main Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Patch-level semver bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant