We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a9abac commit 9754f13Copy full SHA for 9754f13
postgres-types/src/time_02.rs
@@ -14,9 +14,7 @@ const fn base() -> PrimitiveDateTime {
14
impl<'a> FromSql<'a> for PrimitiveDateTime {
15
fn from_sql(_: &Type, raw: &[u8]) -> Result<PrimitiveDateTime, Box<dyn Error + Sync + Send>> {
16
let t = types::timestamp_from_sql(raw)?;
17
- Ok(base()
18
- .checked_add(Duration::microseconds(t))
19
- .ok_or("value too large to decode")?)
+ Ok(base() + Duration::microseconds(t))
20
}
21
22
accepts!(TIMESTAMP);
0 commit comments