Repository navigation
Anime-card start dates are UTC midnight of the day shown - #666
Merged
Merged
Conversation
Cards were converted from midnight in Japan to UTC, so "Oct 2, 2026" read as 2026-10-01T15:00Z and a year-only "2027" as 2026-12-31T15:00Z (the previous year), while Anime::getAired(), the episodes and DateRange are UTC midnight. The hidden start date and the shown text now both give UTC midnight; text with a broadcast time still converts from Japan time (a real instant). Checked on every recorded card page: 2,049 snapshot dates move by exactly +9 hours and nothing else changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Found while comparing v4 and v5 side by side for the upgrade guide. Anime-card start dates (seasonal, schedule, genre, producer cards) were converted from midnight in Japan to UTC. That isn't what the rest of the library does, and it puts some dates in the wrong year when you read them:
2026-10-01T15:00:00+00:002026-10-02T00:00:00+00:002026-12-31T15:00:00+00:00(previous year)2027-01-01T00:00:00+00:00Anime::getAired(), episode dates andDateRangeare all UTC midnight, so one fact had two representations. The year-only case came from #656, where I kept the existing Japan-midnight conversion. A bare year used to give the current date and time, so it was wrong either way, but this is now correct. (Owner decision: UTC midnight.)Change
utcMidnight(); month- or year-only dates fall on the 1st).Verified
AnimeCardHiddenFieldsTest: every card on every recorded card page is UTC midnight of its hidden date; year-only, month-only and unknown dates; the shown-text fallback including the broadcast time.Changelog entry under Changed.
🤖 Generated with Claude Code