Skip to content

Handle nil timestamps in query parameters.#389

Merged
jmcarp merged 1 commit intomainfrom
jmcarp/handle-nil-time
Feb 19, 2026
Merged

Handle nil timestamps in query parameters.#389
jmcarp merged 1 commit intomainfrom
jmcarp/handle-nil-time

Conversation

@jmcarp
Copy link
Contributor

@jmcarp jmcarp commented Feb 19, 2026

We represent timestamps as *time.Time. However, when a nullable timestamp is serialized to query parameters in paths.go, we panic on the nil pointer. This patch adds a helper to wrap time formatting to safely check and omit nil timestamps.

Note: I think we shouldn't represent all timestamps, including non-nullable timestamps, as *time.Time, but I'll think about that in another patch.

We represent timestamps as `*time.Time`. However, when a nullable timestamp is
serialized to query parameters in paths.go, we panic on the nil pointer. This
patch adds a helper to wrap time formatting to safely check and omit nil
timestamps.
@jmcarp jmcarp requested a review from a team as a code owner February 19, 2026 20:16
@jmcarp jmcarp merged commit dfdb24e into main Feb 19, 2026
1 check passed
@jmcarp jmcarp deleted the jmcarp/handle-nil-time branch February 19, 2026 20:22
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.

1 participant

Comments