wire types: use chrono DateTime<Utc> as the timestamp type throughout

This commit is contained in:
damocles 2026-07-03 20:54:33 +02:00 committed by mara
commit 2c5d9ed336
15 changed files with 108 additions and 190 deletions

View file

@ -70,7 +70,7 @@ pub fn for_agent(coord: &Coordinator, agent: &str) -> Result<Vec<LooseEnd>> {
agent: a.agent,
commit_ref: a.commit_ref,
description: a.description,
age_seconds: saturating_age(now, a.requested_at.secs()),
age_seconds: saturating_age(now, a.requested_at.timestamp()),
});
}
for q in coord.questions.pending_all()? {
@ -83,7 +83,7 @@ pub fn for_agent(coord: &Coordinator, agent: &str) -> Result<Vec<LooseEnd>> {
asker: q.asker,
target: q.target,
question: q.question,
age_seconds: saturating_age(now, q.asked_at.secs()),
age_seconds: saturating_age(now, q.asked_at.timestamp()),
});
}
for r in coord.broker.list_pending_reminders()? {
@ -95,7 +95,7 @@ pub fn for_agent(coord: &Coordinator, agent: &str) -> Result<Vec<LooseEnd>> {
owner: r.agent,
message: r.message,
due_at: r.due_at,
age_seconds: saturating_age(now, r.created_at.secs()),
age_seconds: saturating_age(now, r.created_at.timestamp()),
});
}
Ok(out)
@ -114,7 +114,7 @@ pub fn hive_wide(coord: &Coordinator) -> Result<Vec<LooseEnd>> {
agent: a.agent,
commit_ref: a.commit_ref,
description: a.description,
age_seconds: saturating_age(now, a.requested_at.secs()),
age_seconds: saturating_age(now, a.requested_at.timestamp()),
});
}
for q in coord.questions.pending_all()? {
@ -123,7 +123,7 @@ pub fn hive_wide(coord: &Coordinator) -> Result<Vec<LooseEnd>> {
asker: q.asker,
target: q.target,
question: q.question,
age_seconds: saturating_age(now, q.asked_at.secs()),
age_seconds: saturating_age(now, q.asked_at.timestamp()),
});
}
for r in coord.broker.list_pending_reminders()? {
@ -132,7 +132,7 @@ pub fn hive_wide(coord: &Coordinator) -> Result<Vec<LooseEnd>> {
owner: r.agent,
message: r.message,
due_at: r.due_at,
age_seconds: saturating_age(now, r.created_at.secs()),
age_seconds: saturating_age(now, r.created_at.timestamp()),
});
}
Ok(out)