fix: timezone-aware TMDB air dates for non-US viewers#574
Open
Balerman2 wants to merge 1 commit into
Open
Conversation
d640669 to
f5f83c3
Compare
TMDB stores air dates as bare date strings (e.g. '2026-04-26') representing the local air date in US Eastern time. For viewers in timezones ahead of the US, shows airing Sunday evening US time would display the wrong day. Changes: - Add ConvertTmdbDateToIso() method that interprets bare TMDB dates as 9PM US Eastern and converts to ISO 8601 UTC timestamps - Apply conversion to nextAirDate, digitalReleaseDate, theatricalReleaseDate, and initialAirDate in TMDB enrichment - Browser's new Date() then automatically maps UTC to viewer's local day - No configuration needed — works automatically for all users Example: '2026-04-26' (US Sunday) → 2026-04-27T01:00:00Z In NZ (UTC+12): shows as Monday April 27 ✅ In US ET: shows as Sunday April 26 ✅ Fixes n00bcodr#315
f5f83c3 to
e889cd3
Compare
n00bcodr
reviewed
May 11, 2026
| { | ||
| // Assume the show airs at 9 PM in the source timezone on that date | ||
| // This maps the TMDB date (which is a US local date) to a proper UTC timestamp | ||
| var localAirTime = localDate.AddHours(21); // 9 PM in source timezone |
Owner
There was a problem hiding this comment.
This is based on the assumption that all shows air at 9PM which might not be the fact?
|
This pull request has been marked as stale due to 7 days of inactivity. It will be closed in 3 days if no updates are made. |
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.
Problem
TMDB stores air dates as bare date strings (e.g.
"2026-04-26") representing the local air date in US Eastern time. For viewers in timezones ahead of the US, shows airing Sunday evening US time would display the wrong day.For example, a show that airs Sunday 9PM ET is listed as
"2026-04-26"by TMDB. For a viewer in NZ (UTC+12), that episode actually airs Monday 1PM NZST — but the Coming Soon and Requests views would incorrectly show "April 26" (Sunday) instead of "April 27" (Monday).Solution
Added
ConvertTmdbDateToIso()which interprets bare TMDB dates as 9PM US Eastern and converts them to proper ISO 8601 UTC timestamps. The browser'snew Date(dateStr)then automatically maps to the viewer's correct local day.No configuration needed — works automatically for all users.
Example:
"2026-04-26"→2026-04-27T01:00:00ZChanges
JellyfinEnhancedController.cs— AddedConvertTmdbDateToIso()method that interprets bare dates as 9PM America/New_York and converts to UTC. Applied tonextAirDate,digitalReleaseDate,theatricalReleaseDate, andinitialAirDatePluginConfiguration.cs— Minor: reordered field placement (no new config properties)configPage.html— No UI changesBackward Compatibility
Fixes #315