Skip to content

Commit 5a4e842

Browse files
committed
Remove deprecated DateTime::from_utc
1 parent 1a32ebb commit 5a4e842

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/blocks/timewarrior.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ impl From<TimewarriorRAW> for TimewarriorData {
139139
id: item.id,
140140
tags: item.tags,
141141
annotation: item.annotation,
142-
start: DateTime::from_utc(
143-
chrono::NaiveDateTime::parse_from_str(&item.start, "%Y%m%dT%H%M%SZ").unwrap(),
144-
chrono::Utc,
142+
start: chrono::TimeZone::from_utc_datetime(
143+
&chrono::Utc,
144+
&chrono::NaiveDateTime::parse_from_str(&item.start, "%Y%m%dT%H%M%SZ").unwrap()
145145
),
146146
end: item.end.map(|v| {
147-
DateTime::from_utc(
148-
chrono::NaiveDateTime::parse_from_str(&v, "%Y%m%dT%H%M%SZ").unwrap(),
149-
chrono::Utc,
147+
chrono::TimeZone::from_utc_datetime(
148+
&chrono::Utc,
149+
&chrono::NaiveDateTime::parse_from_str(&v, "%Y%m%dT%H%M%SZ").unwrap()
150150
)
151151
}),
152152
}

0 commit comments

Comments
 (0)