Skip to content

Commit 07549b5

Browse files
authored
Merge pull request #13 from hstefan/naive-datetime
Adding `Normalizable` implementation for NaiveDateTime
2 parents dbcbc52 + afa591b commit 07549b5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/lib.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extern crate chrono;
1414
extern crate postgres;
1515

1616
#[cfg(feature = "with-chrono")]
17-
use chrono::{DateTime, TimeZone};
17+
use chrono::{DateTime, NaiveDateTime, TimeZone};
1818
use std::cmp::Ordering;
1919
use std::fmt;
2020
use std::i32;
@@ -176,6 +176,16 @@ impl<T> Normalizable for DateTime<T>
176176
}
177177
}
178178

179+
#[cfg(feature = "with-chrono")]
180+
impl Normalizable for NaiveDateTime
181+
{
182+
fn normalize<S>(bound: RangeBound<S, NaiveDateTime>) -> RangeBound<S, NaiveDateTime>
183+
where
184+
S: BoundSided,
185+
{
186+
bound
187+
}
188+
}
179189

180190
/// The possible sides of a bound.
181191
#[derive(Debug, PartialEq, Eq, Clone, Copy)]

0 commit comments

Comments
 (0)