refactor: replace chrono with jiff for time handling (#1582)

Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
heihutu
2026-01-22 17:24:56 +08:00
committed by GitHub
parent 6631407416
commit db253c01a9
20 changed files with 307 additions and 117 deletions
+4 -3
View File
@@ -154,6 +154,7 @@ impl KmsCache {
mod tests {
use super::*;
use crate::types::{KeyState, KeyUsage};
use jiff::Zoned;
use std::time::Duration;
#[derive(Debug, Clone)]
@@ -202,7 +203,7 @@ mod tests {
key_state: KeyState::Enabled,
key_usage: KeyUsage::EncryptDecrypt,
description: Some("Test key".to_string()),
creation_date: chrono::Utc::now(),
creation_date: Zoned::now(),
deletion_date: None,
origin: "KMS".to_string(),
key_manager: "CUSTOMER".to_string(),
@@ -252,7 +253,7 @@ mod tests {
key_state: KeyState::Enabled,
key_usage: KeyUsage::EncryptDecrypt,
description: Some("TTL test key".to_string()),
creation_date: chrono::Utc::now(),
creation_date: Zoned::now(),
deletion_date: None,
origin: "KMS".to_string(),
key_manager: "CUSTOMER".to_string(),
@@ -283,7 +284,7 @@ mod tests {
key_state: KeyState::Enabled,
key_usage: KeyUsage::EncryptDecrypt,
description: None,
creation_date: chrono::Utc::now(),
creation_date: Zoned::now(),
deletion_date: None,
origin: "KMS".to_string(),
key_manager: "CUSTOMER".to_string(),