Skip to content

Commit 69f22dd

Browse files
committed
Gate test on clock feature
1 parent 6a37b4c commit 69f22dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/datetime/tests.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use std::time::{SystemTime, UNIX_EPOCH};
33
use super::DateTime;
44
use crate::naive::{NaiveDate, NaiveTime};
55
#[cfg(feature = "clock")]
6-
use crate::offset::Local;
7-
use crate::offset::{FixedOffset, Offset, TimeZone, Utc};
6+
use crate::offset::{Local, Offset};
7+
use crate::offset::{FixedOffset, TimeZone, Utc};
88
use crate::oldtime::Duration;
99
use crate::{Datelike, Days, LocalResult, Months, NaiveDateTime};
1010

@@ -985,6 +985,7 @@ fn test_from_naive_date_time_windows() {
985985
}
986986

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

0 commit comments

Comments
 (0)