Skip to content

Commit 0a4427e

Browse files
committed
Fix chrono support
1 parent 5b353aa commit 0a4427e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/types/chrono.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ impl ToSql for NaiveDateTime {
3232
}
3333

3434
impl FromSql for DateTime<UTC> {
35-
fn from_sql<R: Read>(type_: &Type, raw: &mut R, _: &SessionInfo) -> Result<DateTime<UTC>> {
36-
let naive = try!(NaiveDateTime::from_sql(type_, raw));
35+
fn from_sql<R: Read>(type_: &Type, raw: &mut R, info: &SessionInfo) -> Result<DateTime<UTC>> {
36+
let naive = try!(NaiveDateTime::from_sql(type_, raw, info));
3737
Ok(DateTime::from_utc(naive, UTC))
3838
}
3939

4040
accepts!(Type::TimestampTZ);
4141
}
4242

4343
impl ToSql for DateTime<UTC> {
44-
fn to_sql<W: Write+?Sized>(&self, type_: &Type, mut w: &mut W, _: &SessionInfo)
44+
fn to_sql<W: Write+?Sized>(&self, type_: &Type, mut w: &mut W, info: &SessionInfo)
4545
-> Result<IsNull> {
46-
self.naive_utc().to_sql(type_, w)
46+
self.naive_utc().to_sql(type_, w, info)
4747
}
4848

4949
accepts!(Type::TimestampTZ);

0 commit comments

Comments
 (0)