refactor: replace unmaintained chrono with time (RUSTSEC-2026-0543)

Adds a timeutil module (unix_now, is_valid_unix, RFC 3339 format/parse) and moves
ClickHouse event timestamps to time::serde::rfc3339. cargo deny is green again.
This commit is contained in:
Loki 2026-11-21 18:25:22 +01:00
parent f25dc3558a
commit e2adf8601c
Signed by: boba
GPG key ID: 6CDE87BC9A778D97
19 changed files with 74 additions and 128 deletions

View file

@ -7,7 +7,7 @@ use rampart::store::clickhouse::{ClickHouseEvent, ClickHouseWriter, MAX_BUFFER_E
fn event(seq: usize) -> ClickHouseEvent {
ClickHouseEvent {
timestamp: chrono::Utc::now(),
timestamp: time::OffsetDateTime::now_utc(),
event_type: "test".to_string(),
ip: format!("192.0.2.{}", seq % 250),
data_float: 0.0,

View file

@ -5,9 +5,7 @@
use rampart::manager::sync::heartbeat::{NODES_KEY_PATTERN, offline_update};
fn rfc3339(ts: i64) -> String {
chrono::DateTime::from_timestamp(ts, 0)
.expect("in-range timestamp")
.to_rfc3339()
rampart::timeutil::format_rfc3339(ts).expect("in-range timestamp")
}
#[test]