Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 3525210

Browse files
build(deps): bump chrono from 0.4.34 to 0.4.35 (#6350)
* build(deps): bump chrono from 0.4.34 to 0.4.35 Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.34 to 0.4.35. - [Release notes](https://github.com/chronotope/chrono/releases) - [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md) - [Commits](chronotope/chrono@v0.4.34...v0.4.35) --- updated-dependencies: - dependency-name: chrono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Stop using deprecated function --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jon Cinque <[email protected]>
1 parent 6e9860a commit 3525210

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

feature-proposal/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "Apache-2.0"
88
edition = "2021"
99

1010
[dependencies]
11-
chrono = "0.4.34"
11+
chrono = "0.4.35"
1212
clap = "2.33.3"
1313
solana-clap-utils = ">=1.18.2,<=2"
1414
solana-cli-config = ">=1.18.2,<=2"

feature-proposal/cli/src/main.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(clippy::arithmetic_side_effects)]
22
use {
3-
chrono::{DateTime, NaiveDateTime, SecondsFormat, Utc},
3+
chrono::{DateTime, SecondsFormat, Utc},
44
clap::{
55
crate_description, crate_name, crate_version, value_t_or_exit, App, AppSettings, Arg,
66
SubCommand,
@@ -249,11 +249,9 @@ fn get_feature_proposal(
249249
fn unix_timestamp_to_string(unix_timestamp: UnixTimestamp) -> String {
250250
format!(
251251
"{} (UnixTimestamp: {})",
252-
match NaiveDateTime::from_timestamp_opt(unix_timestamp, 0) {
253-
Some(ndt) => DateTime::<Utc>::from_naive_utc_and_offset(ndt, Utc)
254-
.to_rfc3339_opts(SecondsFormat::Secs, true),
255-
None => "unknown".to_string(),
256-
},
252+
DateTime::<Utc>::from_timestamp(unix_timestamp, 0)
253+
.map(|x| x.to_rfc3339_opts(SecondsFormat::Secs, true))
254+
.unwrap_or("unknown".to_string()),
257255
unix_timestamp,
258256
)
259257
}

0 commit comments

Comments
 (0)