Add support for `jiff` date and time types #5390
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 271 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.335
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5390"
general
weight: 0.35
Turbo87
jiff@1.0.0was released yesterday, so it's time to add support here, as suggested by https://github.com/diesel-rs/diesel/discussions/5141#discussioncomment-17871211.With this PR Diesel can now map
jiffdate and time types without a wrapper crate. With the newjifffeaturejiff::civil::Date,jiff::civil::Timeandjiff::civil::DateTimemap toDate,TimeandTimestampon PostgreSQL, SQLite, MySQL and MariaDB.jiff::civil::DateTimealso maps toDatetimeon MySQL and MariaDB, andjiff::Timestampmaps toTimestamptzon PostgreSQL.The encodings follow the existing
chronoandtimeintegrations. In a few places the new code is deliberately stricter:TimestamptzorTimestamptzSqlite.Zsuffix but rejects+HH:MMoffsets. SQLite shifts those values to UTC, so ignoring the offset would return a different time. Thechronoandtimeintegrations currently seem to ignore it.TIMEvalues and values with a time zone displacement. Ajifftype can't represent either one correctly.Compared to
jiff-diesel, users no longer need newtype wrappers, and MariaDB is supported too. SQLite values are now written with a space separator and four-digit years, likechronoandtimeand the native SQLite format.jiff-dieselwrites jiff's ISO format with aTseparator instead, which this impl can still read though.jiff-dieselalso decodesIntervalintoSpan, but a PostgreSQL interval can mix signs between its components, while aSpanhas a single sign. That conversion is left out on purpose, together withjiff::Timestampon SQLite and MySQL,SignedDurationandZoned. Each of these can follow in a separate PR.AI disclosure: I used Claude Opus 5.5 in Claude Code to investigate, plan and implement the changes with human-in-the-loop.
Related