-
-
Notifications
You must be signed in to change notification settings - Fork 252
SimpleExpr::Constant conversion to string drops second fractions #808
Copy link
Copy link
Closed
Description
Looking at
sea-query/src/backend/query_builder.rs
Lines 1076 to 1087 in 1928f23
| #[cfg(feature = "with-chrono")] | |
| Value::ChronoDateTimeUtc(Some(v)) => { | |
| write!(s, "'{}'", v.format("%Y-%m-%d %H:%M:%S %:z")).unwrap() | |
| } | |
| #[cfg(feature = "with-chrono")] | |
| Value::ChronoDateTimeLocal(Some(v)) => { | |
| write!(s, "'{}'", v.format("%Y-%m-%d %H:%M:%S %:z")).unwrap() | |
| } | |
| #[cfg(feature = "with-chrono")] | |
| Value::ChronoDateTimeWithTimeZone(Some(v)) => { | |
| write!(s, "'{}'", v.format("%Y-%m-%d %H:%M:%S %:z")).unwrap() | |
| } |
I think these format strings don't account for second fractions. I hit a case where I was trying to feed constant date-times into a query and the microseconds were getting dropped, I believe the cause was in these lines.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels