Skip to content

Conversation

@Om-Mishra7
Copy link
Contributor

This PR fixes a Postgres error that occurs when users select legacy or deprecated timezone names (e.g. Asia/Calcutta) that are no longer recognized by minimal tzdata installations.

Fixes #3660

Changes Introduced

  • Added canonicalizeTimeZone() helper in src/lib/timezone.ts
  • Maps legacy aliases → canonical IANA names.
  • Example: 'Asia/Calcutta' → 'Asia/Kolkata'.
  • Normalized timezones in API routes
  • Wrapped request timezone in canonicalizeTimeZone() before calling getPageviewStats() and getSessionStats().
  • Default fallback → UTC.

@vercel
Copy link

vercel bot commented Oct 19, 2025

@Om-Mishra7 is attempting to deploy a commit to the umami-software Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Oct 19, 2025

Greptile encountered an error while reviewing this PR. Please reach out to [email protected] for assistance.

@Om-Mishra7
Copy link
Contributor Author

@mikecao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Queries fail with Asia/Calcutta timezone → Postgres 22023 / Prisma P2010 (Umami 2.19.0)

1 participant