Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions sqlx-core/src/sqlite/types/chrono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl Encode<'_, Sqlite> for NaiveDate {

impl Encode<'_, Sqlite> for NaiveTime {
fn encode_by_ref(&self, buf: &mut Vec<SqliteArgumentValue<'_>>) -> IsNull {
Encode::<Sqlite>::encode(self.format("%T%.f%").to_string(), buf)
Encode::<Sqlite>::encode(self.format("%T%.f").to_string(), buf)
}
}

Expand Down Expand Up @@ -181,7 +181,8 @@ impl<'r> Decode<'r, Sqlite> for NaiveTime {
// https://github.com/diesel-rs/diesel/blob/93ab183bcb06c69c0aee4a7557b6798fd52dd0d8/diesel/src/sqlite/types/date_and_time/chrono.rs#L29-L47
let sqlite_time_formats = &[
// Most likely format
"%T.f", // Other formats in order of appearance in docs
"%T.f", "%T%.f",
// Other formats in order of appearance in docs
"%R", "%RZ", "%T%.fZ", "%R%:z", "%T%.f%:z",
];

Expand Down