Skip to content

Commit 3d3705c

Browse files
author
Shawn L.
committed
WIP
1 parent e26ebf5 commit 3d3705c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

postgres-types/src/jiff_02.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ impl<'a> FromSql<'a> for DateTime {
5151

5252
impl ToSql for DateTime {
5353
fn to_sql(&self, _: &Type, w: &mut BytesMut) -> Result<IsNull, Box<dyn Error + Sync + Send>> {
54-
let v = self
55-
.since(base())
56-
.and_then(|s| s.round(round_us()))
54+
eprintln!("to_sql {:?}", self);
55+
let v = dbg!(dbg!(self.since(base())).and_then(|s| s.round(round_us().relative(base()))))
5756
.map_err(transmit_err)?
5857
.get_microseconds();
5958
types::timestamp_to_sql(v, w);

tokio-postgres/tests/test/types/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ where
5555
let result = rows[0].get(0);
5656
assert_eq!(val, &result);
5757

58+
eprintln!(
59+
"val: {:?}, result: {:?}, sql_type: {}, repr: {}",
60+
val, result, sql_type, repr
61+
);
62+
5863
let rows = client
5964
.query(&*format!("SELECT $1::{}", sql_type), &[&val])
6065
.await

0 commit comments

Comments
 (0)