Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upMissing impls for Timestamptz => NaiveDateTime #539
Comments
fluxxu
changed the title from
missing impls for NaiveDateTime
to
missing impls for Timestamptz => NaiveDateTime
Dec 9, 2016
fluxxu
changed the title from
missing impls for Timestamptz => NaiveDateTime
to
Missing impls for Timestamptz => NaiveDateTime
Dec 9, 2016
This comment has been minimized.
|
Did you enable the "chrono" feature in your Cargo.toml for the diesel dependency? The docs say the impl is only available when it's enabled. |
This comment has been minimized.
|
@killercup [dependencies]
chrono = "0.2.25"
diesel = { version = "0.9.0", features = ["chrono"] }
diesel_codegen = { version = "0.9.0", features = ["postgres"] }And DateTime also come from chrono crate but it works. |
sgrif
closed this
in
47ccc5f
Dec 10, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fluxxu commentedDec 9, 2016
•
edited
Compile error:
If I change NaiveDateTime to DateTime then it compiles.
I found there is an impl here:
https://github.com/diesel-rs/diesel/blob/master/diesel/src/pg/types/date_and_time/chrono.rs#L61
Don't know why rustc can't find it...
rustc 1.13.0 (2c6933acc 2016-11-07)
Thanks.
Function:
Table:
Struct: