diff --git a/Cargo.lock b/Cargo.lock index 0e3e533..bba54b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,7 +76,7 @@ checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "beemo-join-time-diff" -version = "0.1.0" +version = "4.0.0" dependencies = [ "anyhow", "chrono", diff --git a/src/main.rs b/src/main.rs index 5dad4a2..082fc6d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,11 +57,13 @@ fn main() -> Result<()> { }; for (idx, join_date) in matches.iter().enumerate() { + // Add the date to add a valid DateTime. let mut date: DateTime = DateTime::parse_from_str( &format!("{}T{}", log_date, join_date), "%Y/%m/%dT%H:%M:%S%.3f%z", ) .with_context(|| format!("Could not parse date `{}T{}`", log_date, join_date))? + // Convert to UTC. .try_into() .with_context(|| format!("Could not parse date `{}T{}`", log_date, join_date))?;