Skip to content

Commit

Permalink
docs: add comments
Browse files Browse the repository at this point in the history
Took 5 minutes
  • Loading branch information
net-tech committed Oct 17, 2023
1 parent 1260311 commit dd7dc8b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 146 deletions.
164 changes: 19 additions & 145 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ edition = "2021"
anyhow = "1.0.75"
chrono = "0.4.31"
humantime = "2.1.0"
indicatif = "0.17.6"
regex = "1.9.6"
reqwest = { version = "0.11.22", features = ["blocking"] }
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Utc> = 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))?;

Expand Down

0 comments on commit dd7dc8b

Please sign in to comment.