Skip to content

Commit

Permalink
Revert time 0.2 change
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Feb 2, 2025
1 parent 1a9abac commit 9754f13
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions postgres-types/src/time_02.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ const fn base() -> PrimitiveDateTime {
impl<'a> FromSql<'a> for PrimitiveDateTime {
fn from_sql(_: &Type, raw: &[u8]) -> Result<PrimitiveDateTime, Box<dyn Error + Sync + Send>> {
let t = types::timestamp_from_sql(raw)?;
Ok(base()
.checked_add(Duration::microseconds(t))
.ok_or("value too large to decode")?)
Ok(base() + Duration::microseconds(t))
}

accepts!(TIMESTAMP);
Expand Down

0 comments on commit 9754f13

Please sign in to comment.