Skip to content

Conversation

@GRBurst
Copy link

@GRBurst GRBurst commented Jan 15, 2026

Based on the PR #4671 adding support for time datatype, this adds the timetz datatype. Interestingly, everything to do so was already in place (like the timetz type), so we only have to slightly extend existing logic.

You can find information about the pg types in postgres' datatype-date doc.

Tests were added to test the new behavior.

Note: time is actually time without timezone and therefore adding this would only adding the correct mapping. Hence the added code is mainly related to support timezones and is similar to the code that is in place for timestamp with timezone.

Edit:
I tested this PR in our application test setup and with our application now as well. I was previously facing the error:

 Error: Schema incompatibility detected between your zero schema definition and the database:
  - Type mismatch for column "time" in table "<mytable>": time without time zone is currently unsupported in Zero. Please file a bug at https://bugs.rocicorp.dev/
Please update your schema definition to match the database or migrate your database to match the schema.

This PR solves our problems (test passes with it and ui works) and removes a blocker for us. The outcome is as expected.

postgres app ui
image image

Signed-off-by: GRBurst <GRBurst@protonmail.com>
@vercel
Copy link

vercel bot commented Jan 15, 2026

@GRBurst is attempting to deploy a commit to the Rocicorp Team on Vercel.

A member of the Team first needs to authorize it.

@aboodman
Copy link
Contributor

Thank you for this contribution! It seems reasonable to me. @darkgnotic should review it since he knows this code better.

@aboodman aboodman requested a review from darkgnotic January 15, 2026 07:50
@darkgnotic
Copy link
Contributor

Cool, thank you @GRBurst!

I will pass this to @tantaman as he was the (real) reviewer of original support for the time type (#4671).

@darkgnotic darkgnotic requested review from tantaman and removed request for darkgnotic January 15, 2026 17:55
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.

3 participants