Skip to content

Commit

Permalink
Predicate Local conversion fns on clock feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mqudsi committed Apr 8, 2019
1 parent 973c603 commit ad6872c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ impl From<DateTime<Utc>> for DateTime<FixedOffset> {
}

/// Convert a `DateTime<Utc>` instance into a `DateTime<Local>` instance.
#[cfg(feature="clock")]
impl From<DateTime<Utc>> for DateTime<Local> {
/// Convert this `DateTime<Utc>` instance into a `DateTime<Local>` instance.
///
Expand All @@ -268,6 +269,7 @@ impl From<DateTime<FixedOffset>> for DateTime<Utc> {
}

/// Convert a `DateTime<FixedOffset>` instance into a `DateTime<Local>` instance.
#[cfg(feature="clock")]
impl From<DateTime<FixedOffset>> for DateTime<Local> {
/// Convert this `DateTime<FixedOffset>` instance into a `DateTime<Local>` instance.
///
Expand All @@ -279,6 +281,7 @@ impl From<DateTime<FixedOffset>> for DateTime<Local> {
}

/// Convert a `DateTime<Local>` instance into a `DateTime<Utc>` instance.
#[cfg(feature="clock")]
impl From<DateTime<Local>> for DateTime<Utc> {
/// Convert this `DateTime<Local>` instance into a `DateTime<Utc>` instance.
///
Expand All @@ -290,6 +293,7 @@ impl From<DateTime<Local>> for DateTime<Utc> {
}

/// Convert a `DateTime<Local>` instance into a `DateTime<FixedOffset>` instance.
#[cfg(feature="clock")]
impl From<DateTime<Local>> for DateTime<FixedOffset> {
/// Convert this `DateTime<Local>` instance into a `DateTime<FixedOffset>` instance.
///
Expand Down

0 comments on commit ad6872c

Please sign in to comment.