Skip to content

sqlx-sqlite: migrate datetime format builders off time 0.3.48-deprecated component API #4310

@ricochet

Description

@ricochet

I have found these related issues/pull requests

noticed CI failing after kicking off my own pr

Description

time 0.3.48 deprecated the field-based modifier::{Year, Month, Hour} format components, the Component::{Year, Month, Hour} variants, and raw-byte BorrowedFormatItem::Literal.

sqlx-sqlite/src/types/time.rs builds its datetime parse/format descriptions with exactly these, so under clippy -- -D warnings it now produces 40 errors.

Because Cargo.lock is no longer tracked, CI resolves the latest time (currently 0.3.49), so the check job fails for every PR and for main.

Reproduction steps

cargo update -p time --precise 0.3.49
cargo clippy -p sqlx-sqlite --no-default-features --features time,bundled -- -D warnings
# error: use of deprecated ... (×40) → could not compile `sqlx-sqlite`

or

Triggered by check job: cargo clippy --features all-databases,…,macros -- -D warnings, see https://github.com/transact-rs/sqlx/actions/runs/27623575467/job/81678916197

SQLx version

main, latest release 0.9.0

Enabled SQLx features

time

Database server and version

sqlite

Operating system

macos

Rust version

rustc 1.94.1 (e408947bf 2026-03-25)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions