Skip to content

Commit

Permalink
switch from NaiveDateTime::from_timestamp_opt to DateTime::from_times…
Browse files Browse the repository at this point in the history
…tamp
  • Loading branch information
wfraser committed Mar 18, 2024
1 parent 410ac55 commit 6740072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/large-file-upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ fn iso8601(t: SystemTime) -> String {
Err(e) => -(e.duration().as_secs() as i64),
};

chrono::NaiveDateTime::from_timestamp_opt(timestamp, 0 /* nsecs */)
chrono::DateTime::from_timestamp(timestamp, 0 /* nsecs */)
.expect("invalid or out-of-range timestamp")
.format("%Y-%m-%dT%H:%M:%SZ").to_string()
}
Expand Down

0 comments on commit 6740072

Please sign in to comment.