Julian/Unix times are ambiguous when converted to DateTime.

This commit is contained in:
gwenn 2016-04-15 21:02:08 +02:00
parent 57b492ffb2
commit 1cf68d2184

View File

@ -237,13 +237,16 @@ impl FromSql for DateTime<Local> {
Err(err) => Err(Error::FromSqlConversionFailure(Box::new(err))),
}
} else {
// TODO from_utc_datetime versus from from_local_datetime
NaiveDateTime::column_result(stmt, col).map(|dt| Local.from_utc_datetime(&dt))
}
}
ffi::SQLITE_INTEGER => {
// TODO from_utc_datetime versus from from_local_datetime
NaiveDateTime::column_result(stmt, col).map(|dt| Local.from_utc_datetime(&dt))
}
ffi::SQLITE_FLOAT => {
// TODO from_utc_datetime versus from from_local_datetime
NaiveDateTime::column_result(stmt, col).map(|dt| Local.from_utc_datetime(&dt))
}
_ => Err(Error::InvalidColumnType),