Skip to content

Commit 741137d

Browse files
committed
chore: fix issue
1 parent 42da7f8 commit 741137d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

rust/cubesql/pg-srv/src/values/timestamp.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,12 @@ impl ToProtocolValue for TimestampValue {
107107
None => self.to_naive_datetime(),
108108
Some(_) => self.to_fixed_datetime()?.naive_utc(),
109109
};
110-
let ts_str = ndt.format("%Y-%m-%d %H:%M:%S%.6f").to_string();
111-
ts_str.to_text(buf)
110+
let as_str = ndt.format("%Y-%m-%d %H:%M:%S%.6f").to_string();
111+
112+
match self.tz_ref() {
113+
None => as_str.to_text(buf),
114+
Some(_) => (as_str + "+00").to_text(buf),
115+
}
112116
}
113117

114118
fn to_binary(&self, buf: &mut BytesMut) -> Result<(), ProtocolError> {

0 commit comments

Comments
 (0)