Skip to content

Commit 9754f13

Browse files
committed
Revert time 0.2 change
1 parent 1a9abac commit 9754f13

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

postgres-types/src/time_02.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ const fn base() -> PrimitiveDateTime {
1414
impl<'a> FromSql<'a> for PrimitiveDateTime {
1515
fn from_sql(_: &Type, raw: &[u8]) -> Result<PrimitiveDateTime, Box<dyn Error + Sync + Send>> {
1616
let t = types::timestamp_from_sql(raw)?;
17-
Ok(base()
18-
.checked_add(Duration::microseconds(t))
19-
.ok_or("value too large to decode")?)
17+
Ok(base() + Duration::microseconds(t))
2018
}
2119

2220
accepts!(TIMESTAMP);

0 commit comments

Comments
 (0)