Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the parsing of pgtype.Time stricter and add tests #1951

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

felix-roehrich
Copy link
Contributor

PR as discussed in #1940.

The of strings for pgtype.Time is now stricter and I have added corresponding tests. While doing so I also discovered that the Valid attribute is not set back to false if parsing fails (in case a variable is reused); now Valid is set to false and Microseconds to 0.

If you have any comments, let me know.

@jackc jackc merged commit fc416d2 into jackc:master Apr 16, 2024
14 checks passed
@felix-roehrich felix-roehrich deleted the fr/strict-time-parse branch December 7, 2024 21:11
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.

2 participants