Implement: libowski-bot-fix-vikes-timezone.md - #6
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-tvcommand extracts game start times from JSON-LDSportsEventobjects found onhttps://www.vikings.com/schedule/. ThestartDateproperty in these objects is currently parsed as GMT (likely due to missing offset information or defaultnew Date()behavior), causing game times to appear incorrectly for users expecting Pacific Standard Time (PST).Acceptance Criteria
src/commands/view-vikes-tv.jsto correctly convert or display game times in PST/PDT.Notes for implementer
startDatefield in JSON-LDSportsEventschemas is typically an ISO 8601 string. If the string lacks an offset (e.g.,2023-10-01T10:00:00), JavaScript’sDateconstructor treats it as UTC.Intl.DateTimeFormator a lightweight library likedate-fns-tzto format the date string specifically for theAmerica/Los_Angelestimezone before passing it to theEmbedBuilder.Dateobjects, ensure the timezone conversion happens immediately before stringifying the date for the Discord UI.