mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 19:41:37 +08:00
Julian/Unix times are ambiguous when converted to DateTime.
This commit is contained in:
parent
57b492ffb2
commit
1cf68d2184
@ -237,13 +237,16 @@ impl FromSql for DateTime<Local> {
|
|||||||
Err(err) => Err(Error::FromSqlConversionFailure(Box::new(err))),
|
Err(err) => Err(Error::FromSqlConversionFailure(Box::new(err))),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// TODO from_utc_datetime versus from from_local_datetime
|
||||||
NaiveDateTime::column_result(stmt, col).map(|dt| Local.from_utc_datetime(&dt))
|
NaiveDateTime::column_result(stmt, col).map(|dt| Local.from_utc_datetime(&dt))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ffi::SQLITE_INTEGER => {
|
ffi::SQLITE_INTEGER => {
|
||||||
|
// TODO from_utc_datetime versus from from_local_datetime
|
||||||
NaiveDateTime::column_result(stmt, col).map(|dt| Local.from_utc_datetime(&dt))
|
NaiveDateTime::column_result(stmt, col).map(|dt| Local.from_utc_datetime(&dt))
|
||||||
}
|
}
|
||||||
ffi::SQLITE_FLOAT => {
|
ffi::SQLITE_FLOAT => {
|
||||||
|
// TODO from_utc_datetime versus from from_local_datetime
|
||||||
NaiveDateTime::column_result(stmt, col).map(|dt| Local.from_utc_datetime(&dt))
|
NaiveDateTime::column_result(stmt, col).map(|dt| Local.from_utc_datetime(&dt))
|
||||||
}
|
}
|
||||||
_ => Err(Error::InvalidColumnType),
|
_ => Err(Error::InvalidColumnType),
|
||||||
|
Loading…
Reference in New Issue
Block a user