Skip to content

fix: timezone-aware TMDB air dates for non-US viewers#574

Open
Balerman2 wants to merge 1 commit into
n00bcodr:mainfrom
Balerman2:feature/seerr-timezone-fix
Open

fix: timezone-aware TMDB air dates for non-US viewers#574
Balerman2 wants to merge 1 commit into
n00bcodr:mainfrom
Balerman2:feature/seerr-timezone-fix

Conversation

@Balerman2

@Balerman2 Balerman2 commented Apr 26, 2026

Copy link
Copy Markdown

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's new 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:00Z

  • NZ viewer (UTC+12): Monday, April 27
  • US ET viewer: Sunday, April 26

Changes

  • JellyfinEnhancedController.cs — Added ConvertTmdbDateToIso() method that interprets bare dates as 9PM America/New_York and converts to UTC. Applied to nextAirDate, digitalReleaseDate, theatricalReleaseDate, and initialAirDate
  • PluginConfiguration.cs — Minor: reordered field placement (no new config properties)
  • configPage.html — No UI changes

Backward Compatibility

  • Already-ISO timestamps pass through unchanged
  • Fallback to UTC if timezone lookup fails
  • No database or config changes required
  • Zero-config: users don't need to touch anything

Fixes #315

@Balerman2 Balerman2 force-pushed the feature/seerr-timezone-fix branch from d640669 to f5f83c3 Compare April 26, 2026 23:43
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
@Balerman2 Balerman2 force-pushed the feature/seerr-timezone-fix branch from f5f83c3 to e889cd3 Compare April 26, 2026 23:47
Comment on lines +5427 to +5430
catch
{
tz = TimeZoneInfo.Utc;
}
Comment on lines +5444 to +5448
catch (Exception)
{
// Fallback: treat as UTC
return localAirTime.ToUniversalTime().ToString("o");
}
@github-actions github-actions Bot added the stale label May 9, 2026
Repository owner deleted a comment from github-actions Bot May 9, 2026
@github-actions github-actions Bot removed the stale label May 10, 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

@n00bcodr n00bcodr May 11, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is based on the assumption that all shows air at 9PM which might not be the fact?

@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the stale label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

➕[Feature Request] Coming soon Tab in requests view

3 participants