mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
chore: update chrono dependency (#19943)
Pulled from https://github.com/denoland/deno/pull/19747 Authored-by: Cooper Benson <skycoop@gmail.com>
This commit is contained in:
parent
e30bea2272
commit
4cf33c71df
3 changed files with 15 additions and 8 deletions
16
Cargo.lock
generated
16
Cargo.lock
generated
|
@ -108,6 +108,12 @@ dependencies = [
|
|||
"alloc-no-stdlib",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "android-tzdata"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "0.3.2"
|
||||
|
@ -503,11 +509,11 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.22"
|
||||
version = "0.4.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1"
|
||||
checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
|
||||
dependencies = [
|
||||
"num-integer",
|
||||
"android-tzdata",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
|
@ -5805,9 +5811,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
|
|||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.3.0"
|
||||
version = "1.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79"
|
||||
checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d"
|
||||
dependencies = [
|
||||
"getrandom 0.2.10",
|
||||
"serde",
|
||||
|
|
|
@ -60,7 +60,7 @@ base32 = "=0.4.0"
|
|||
base64.workspace = true
|
||||
bincode = "=1.3.3"
|
||||
cache_control.workspace = true
|
||||
chrono = { version = "=0.4.22", default-features = false, features = ["std"] }
|
||||
chrono = { version = "=0.4.26", default-features = false, features = ["std"] }
|
||||
clap = { version = "=4.3.3", features = ["string"] }
|
||||
clap_complete = "=4.3.1"
|
||||
clap_complete_fig = "=4.3.1"
|
||||
|
|
|
@ -14,9 +14,10 @@ pub fn utc_now() -> chrono::DateTime<chrono::Utc> {
|
|||
let now = std::time::SystemTime::now()
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
.expect("system time before Unix epoch");
|
||||
let naive = chrono::NaiveDateTime::from_timestamp(
|
||||
let naive = chrono::NaiveDateTime::from_timestamp_opt(
|
||||
now.as_secs() as i64,
|
||||
now.subsec_nanos(),
|
||||
);
|
||||
)
|
||||
.unwrap();
|
||||
chrono::DateTime::from_utc(naive, chrono::Utc)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue