build(deps): bump chrono from 0.4.34 to 0.4.37 (#603)
* build(deps): bump chrono from 0.4.34 to 0.4.37 Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.34 to 0.4.37. - [Release notes](https://github.com/chronotope/chrono/releases) - [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md) - [Commits](https://github.com/chronotope/chrono/compare/v0.4.34...v0.4.37) --- updated-dependencies: - dependency-name: chrono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * [auto-commit] Update all Cargo lock files * update deprecated functions * add test_unix_timestamp_to_string --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com> Co-authored-by: yihau <yihau.chen@icloud.com>
This commit is contained in:
parent
e09541a762
commit
948caebfa9
|
@ -1277,9 +1277,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
|
|||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.34"
|
||||
version = "0.4.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b"
|
||||
checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e"
|
||||
dependencies = [
|
||||
"android-tzdata",
|
||||
"iana-time-zone",
|
||||
|
|
|
@ -173,7 +173,7 @@ bzip2 = "0.4.4"
|
|||
caps = "0.5.5"
|
||||
cargo_metadata = "0.15.4"
|
||||
cc = "1.0.83"
|
||||
chrono = { version = "0.4.34", default-features = false }
|
||||
chrono = { version = "0.4.37", default-features = false }
|
||||
chrono-humanize = "0.2.3"
|
||||
clap = "2.33.1"
|
||||
console = "0.15.8"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use {
|
||||
crate::cli_output::CliSignatureVerificationStatus,
|
||||
base64::{prelude::BASE64_STANDARD, Engine},
|
||||
chrono::{Local, NaiveDateTime, SecondsFormat, TimeZone, Utc},
|
||||
chrono::{DateTime, Local, SecondsFormat, TimeZone, Utc},
|
||||
console::style,
|
||||
indicatif::{ProgressBar, ProgressStyle},
|
||||
solana_cli_config::SettingType,
|
||||
|
@ -715,10 +715,8 @@ pub fn new_spinner_progress_bar() -> ProgressBar {
|
|||
}
|
||||
|
||||
pub fn unix_timestamp_to_string(unix_timestamp: UnixTimestamp) -> String {
|
||||
match NaiveDateTime::from_timestamp_opt(unix_timestamp, 0) {
|
||||
Some(ndt) => Utc
|
||||
.from_utc_datetime(&ndt)
|
||||
.to_rfc3339_opts(SecondsFormat::Secs, true),
|
||||
match DateTime::from_timestamp(unix_timestamp, 0) {
|
||||
Some(ndt) => ndt.to_rfc3339_opts(SecondsFormat::Secs, true),
|
||||
None => format!("UnixTimestamp {unix_timestamp}"),
|
||||
}
|
||||
}
|
||||
|
@ -976,4 +974,9 @@ Rewards:
|
|||
"abcdefghijklmnopqrstuvwxyz12345 (1111..1111)"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_unix_timestamp_to_string() {
|
||||
assert_eq!(unix_timestamp_to_string(1628633791), "2021-08-10T22:16:31Z");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1015,9 +1015,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
|
|||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.34"
|
||||
version = "0.4.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b"
|
||||
checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e"
|
||||
dependencies = [
|
||||
"android-tzdata",
|
||||
"iana-time-zone",
|
||||
|
|
Loading…
Reference in New Issue