GRI-2182: migrate chrono to time across client, server and shared #313

Merged
vivy merged 1 commit from feature/GRI-2182-chrono-to-time into dev 2026-11-17 20:03:46 +00:00
Member

Summary

Closes grimoire-of-digital-signage#307 / GRI-2182. Removes chrono
(RUSTSEC-2026-0543, unmaintained, accepted as a dated ignore in
deny.toml by #305/GRI-2178) by migrating client, server and shared
to time, and switching the sqlx-postgres feature from chrono to
time so the crate is no longer pulled in transitively either.

  • Replaced every direct chrono:: use across the 13 files that actually
    used it (two named in the issue, devices.rs/devices/handlers.rs,
    did not and were left alone; two test files not named in the issue did
    and moved with their production code).
  • auth/handlers.rs session expires_at arithmetic now uses
    time::OffsetDateTime + time::Duration.
  • API-facing struct fields serialize via #[serde(with = "time::serde::rfc3339")] / ::option so the JSON wire format to
    frontend-web is unchanged.
  • deny.toml's now-stale ignore entry for RUSTSEC-2026-0543 removed.

Test plan

  • ./scripts/local-gates.sh --rust-only — every gate passed (git
    hooks, pre-push, install.sh tests, cargo fmt, clippy, cargo test
    (all crates), cargo test --doc, cargo deny advisories/bans/licenses/sources)
  • Wire-format regression: existing timestamp-field serialization
    tests pass unchanged against time's rfc3339 serde impl
  • Session-expiry arithmetic covered by existing auth store/handler tests
## Summary Closes grimoire-of-digital-signage#307 / GRI-2182. Removes `chrono` (RUSTSEC-2026-0543, unmaintained, accepted as a dated `ignore` in `deny.toml` by #305/GRI-2178) by migrating `client`, `server` and `shared` to `time`, and switching the `sqlx-postgres` feature from `chrono` to `time` so the crate is no longer pulled in transitively either. - Replaced every direct `chrono::` use across the 13 files that actually used it (two named in the issue, `devices.rs`/`devices/handlers.rs`, did not and were left alone; two test files not named in the issue did and moved with their production code). - `auth/handlers.rs` session `expires_at` arithmetic now uses `time::OffsetDateTime` + `time::Duration`. - API-facing struct fields serialize via `#[serde(with = "time::serde::rfc3339")]` / `::option` so the JSON wire format to `frontend-web` is unchanged. - `deny.toml`'s now-stale `ignore` entry for RUSTSEC-2026-0543 removed. ## Test plan - [x] `./scripts/local-gates.sh --rust-only` — every gate passed (git hooks, pre-push, install.sh tests, cargo fmt, clippy, cargo test (all crates), cargo test --doc, cargo deny advisories/bans/licenses/sources) - [x] Wire-format regression: existing timestamp-field serialization tests pass unchanged against `time`'s rfc3339 serde impl - [x] Session-expiry arithmetic covered by existing auth store/handler tests
GRI-2182: migrate chrono to time across client, server and shared
All checks were successful
CI / the pre-push hook (pull_request) Successful in 8s
CI / cargo fmt (pull_request) Successful in 3s
CI / install.sh client upgrade (pull_request) Successful in 17s
CI / cargo deny (pull_request) Successful in 12s
CI / cargo deny advisories (pull_request) Successful in 19s
CI / repository boundary (pull_request) Successful in 5s
CI / cargo clippy (pull_request) Successful in 1m7s
CI / frontend-web (pull_request) Successful in 1m0s
CI / cargo test (pull_request) Successful in 3m27s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
cd00de6ac7
Drops the unmaintained chrono crate (RUSTSEC-2026-0543) and the sqlx
chrono feature in favour of time, which sqlx 0.8.6 supports natively.
Removes the now-stale ignore entry for the advisory from deny.toml.
vivy approved these changes 2026-11-17 20:03:44 +00:00
vivy left a comment

Reviewed. Mechanical chrono -> time migration; every serialized timestamp has an explicit rfc3339 serde adapter, so the wire format (RFC 3339, 'Z' for UTC) stays compatible with clients already on campus running the chrono build, in both directions. sqlx feature switched to time; Cargo.lock drops chrono and iana-time-zone entirely, and the RUSTSEC-2026-0543 ignore is removed (required by -D advisory-not-detected, and the advisory gate is green). Approved.

Reviewed. Mechanical chrono -> time migration; every serialized timestamp has an explicit rfc3339 serde adapter, so the wire format (RFC 3339, 'Z' for UTC) stays compatible with clients already on campus running the chrono build, in both directions. sqlx feature switched to time; Cargo.lock drops chrono and iana-time-zone entirely, and the RUSTSEC-2026-0543 ignore is removed (required by -D advisory-not-detected, and the advisory gate is green). Approved.
vivy merged commit d7177abb95 into dev 2026-11-17 20:03:46 +00:00
vivy deleted branch feature/GRI-2182-chrono-to-time 2026-11-17 20:03:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!313
No description provided.