Skip to content

Commit

Permalink
Gate test on clock feature
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker authored and djc committed May 12, 2023
1 parent 6a37b4c commit 6655649
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/datetime/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use std::time::{SystemTime, UNIX_EPOCH};

use super::DateTime;
use crate::naive::{NaiveDate, NaiveTime};
use crate::offset::{FixedOffset, TimeZone, Utc};
#[cfg(feature = "clock")]
use crate::offset::Local;
use crate::offset::{FixedOffset, Offset, TimeZone, Utc};
use crate::offset::{Local, Offset};
use crate::oldtime::Duration;
use crate::{Datelike, Days, LocalResult, Months, NaiveDateTime};

Expand Down Expand Up @@ -985,6 +985,7 @@ fn test_from_naive_date_time_windows() {
}

#[test]
#[cfg(feature = "clock")]
fn test_datetime_local_from_preserves_offset() {
let naivedatetime = NaiveDate::from_ymd_opt(2023, 1, 1).unwrap().and_hms_opt(0, 0, 0).unwrap();

Expand Down

0 comments on commit 6655649

Please sign in to comment.