Skip to content

feat!: replace chrono/chrono-tz with jiff behind newtypes#80

Merged
antejavor merged 1 commit into
memgraph:masterfrom
seuros:refactor/chrono-to-jiff
Jul 9, 2026
Merged

feat!: replace chrono/chrono-tz with jiff behind newtypes#80
antejavor merged 1 commit into
memgraph:masterfrom
seuros:refactor/chrono-to-jiff

Conversation

@seuros

@seuros seuros commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

BREAKING CHANGE: Value/QueryParam date variants now use rsmgclient-owned Date/LocalTime/LocalDateTime/Duration newtypes instead of chrono::Naive*/ Duration. jiff is a private implementation detail, so future datetime-backend swaps stay non-breaking.

  • drop chrono + chrono-tz deps; add jiff (bundles tzdb, no separate tz crate)
  • mg_value_datetime_zone_id now resolves the instant in its IANA zone via jiff TimeZone instead of manual chrono-tz offset math
  • Duration wraps jiff SignedDuration (flat duration, matching prior semantics)
  • Display output preserved (LocalDateTime space separator, Duration PT..S)

Note: zoned DateTime now reports zone-local wall-clock fields (previously UTC fields + separate offset); identical for UTC, corrected for other zones.

@andrejtonev , you have to release current master, then merge thus one and bump the version for this one.

Existing users will have to update their code, but get 1 less dependency and a more correct crate than chrono.
Future time backend changes will not break the contract as this crate own it.

@seuros seuros requested review from antejavor and gitbuda as code owners June 26, 2026 07:48
BREAKING CHANGE: Value/QueryParam date variants now use rsmgclient-owned
Date/LocalTime/LocalDateTime/Duration newtypes instead of chrono::Naive*/
Duration. jiff is a private implementation detail, so future datetime-backend
swaps stay non-breaking.

- drop chrono + chrono-tz deps; add jiff (bundles tzdb, no separate tz crate)
- mg_value_datetime_zone_id now resolves the instant in its IANA zone via
  jiff TimeZone instead of manual chrono-tz offset math
- Duration wraps jiff SignedDuration (flat duration, matching prior semantics)
- Display output preserved (LocalDateTime space separator, Duration PT..S)

Note: zoned DateTime now reports zone-local wall-clock fields (previously UTC
fields + separate offset); identical for UTC, corrected for other zones.
@seuros seuros force-pushed the refactor/chrono-to-jiff branch from ddffed6 to 96e026f Compare July 9, 2026 12:03

@antejavor antejavor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, so what we have here i a bit of separation into the rsmgclient owning the date types via the jiff, looks good! Great job @seuros 🦾

@antejavor antejavor merged commit 23d0ced into memgraph:master Jul 9, 2026
6 checks passed
@antejavor antejavor mentioned this pull request Jul 10, 2026
antejavor added a commit that referenced this pull request Jul 10, 2026
The chrono/chrono-tz -> jiff migration (#80) changes public Date,
LocalTime, LocalDateTime, and Duration types, which is a breaking
change for consumers matching or constructing those variants.
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