Merged
Conversation
Contributor
size-limit report 📦
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issues with handling historical dates in the PostgreSQL adapter by preventing JavaScript's 2-digit year interpretation from corrupting dates with years below 100 AD.
- Replaces the existing timestamp parsing logic with manual parsing to avoid JavaScript Date constructor issues
- Implements custom parsers for both TIMESTAMP and TIMESTAMPTZ data types that preserve original year values
- Adds comprehensive test coverage for edge cases including historical dates and timezone handling
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/adapter-pg/src/conversion.ts | Implements manual timestamp parsing logic to handle historical dates correctly |
| packages/adapter-pg/src/tests/conversion.test.ts | Adds comprehensive test coverage for the new timestamp parsing functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
jacek-prisma
reviewed
Oct 8, 2025
Contributor
|
Client memory tests, node 24, library: ✅ Success |
jacek-prisma
reviewed
Oct 9, 2025
jacek-prisma
reviewed
Oct 9, 2025
jacek-prisma
reviewed
Oct 9, 2025
jacek-prisma
reviewed
Oct 9, 2025
…historical-dates"; simplified "normalize_timestamp"
…tz"" This reverts commit d4b4eb1.
Contributor
|
Added a simplified implementation and tested it manually against QE @jkomyno |
aqrln
reviewed
Oct 14, 2025
aqrln
reviewed
Oct 14, 2025
packages/client/tests/functional/issues/28192-pg-historical-dates/test.ts
Outdated
Show resolved
Hide resolved
aqrln
reviewed
Oct 14, 2025
packages/client/tests/functional/issues/28192-pg-historical-dates/test.ts
Show resolved
Hide resolved
aqrln
approved these changes
Oct 14, 2025
aqrln
added a commit
that referenced
this pull request
Oct 16, 2025
Conflicts in `packages/config` were automatically solved using [Mergiraf](https://mergiraf.org/). Commits: - **fix: fix neon listener leak (#28255)** - **feat(qpe): add an option to disable logging to console (#28253)** - **feat(adapter-mssql): support multiSubnetFailover flag in connection string (#28261)** - **chore: use pnpm catalog (#28236)** - **fix: revert "chore: use pnpm catalog (#28236)" (#28271)** - **chore: upgrade OpenTelemetry deps and refresh tracing setup in client (#28268)** - **chore(deps): update engines to 6.18.0-3.b03d75f1a67e62289420f5697c28a3ff8dbb0424 (#28258)** - **feat(qpe): expose package version as an export (#28275)** - **feat: support OpenTelemetry in loadable sub-commands (#28272)** - **chore(deps): update engines to 6.18.0-6.9bf76dbea6c9e34d59a3577015bd1e94bfda7624 (#28288)** - **fix(adapter-pg): historical dates (#28212)** - **chore(deps): update engines to 6.18.0-7.d3fc122f88ca3ce86f67a797debfb179a39ccf48 (#28293)** - **fix: support multiple Prisma instances with different providers (#28291)** - **feat(config): add support for `engine?: 'js' | 'classic'` (#28266)**
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.
This PR: