You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run cargo sqlx prepare, it finishes without errors.
Then, when I compile the binary, I get the following error:
error[E0277]: the trait bound `OffsetDateTime: From<DateTime<Utc>>` is not satisfied
the trait `From<DateTime<Utc>>` is not implemented for `OffsetDateTime`
As soon as I replace time::OffsetDateTime with chrono::DateTime<Utc> in the Rust type without changing anything else, the binary compiles.
Info
SQLx version: 0.7.1
SQLx features enabled: "runtime-tokio", "postgres", "tls-rustls", "uuid", "time"
Activity
saiintbrisson commentedon Aug 17, 2023
Would you be able to provide a
cargo treeof everything belowsqlx? I guess there's something enabling thechronofeature as well, which clashes with the definition onhttps://github.com/launchbadge/sqlx/blob/d0fbe7feff4b3a200cf0453417d5e53bd011643a/sqlx-macros-core/src/database/postgres.rs#L29-L57
alex35mil commentedon Aug 22, 2023
@saiintbrisson Yeah, will do. I’m on vacation ATM. I’ll post the lock file as soon as I get to my laptop.
alex35mil commentedon Aug 29, 2023
@saiintbrisson Here it is:
cargo treejulien-leclercq commentedon Sep 14, 2023
I have the same issue! (For me it's oauth2 and openidconnect which are bringing chrono as a dependency) Is there a known workaround ?
saiintbrisson commentedon Sep 14, 2023
@julien-leclercq none that I can think of atm, #2697 is a probable fix, but I haven't gotten any reactions there from the maintainers
julien-leclercq commentedon Sep 14, 2023
@saiintbrisson thanks, I temporarily switched to chrono. Glad that this kind of stuff happens so early in my project 😅.
abonander commentedon Oct 12, 2023
See: #2697 (comment)