hive-c0re: finish chrono-clock migration
This commit is contained in:
parent
f4a35786b1
commit
9293c5d580
14 changed files with 82 additions and 78 deletions
|
|
@ -15,7 +15,6 @@ use std::sync::Mutex;
|
|||
use anyhow::{Context, Result, bail};
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use hive_sh4re::wire_time::now_unix;
|
||||
use rusqlite::{Connection, OptionalExtension, params};
|
||||
use serde::Serialize;
|
||||
|
||||
|
|
@ -119,7 +118,7 @@ impl OperatorQuestions {
|
|||
i64::from(multi),
|
||||
deadline_at,
|
||||
target,
|
||||
now_unix(),
|
||||
Utc::now().timestamp(),
|
||||
],
|
||||
)?;
|
||||
Ok(conn.last_insert_rowid())
|
||||
|
|
@ -177,7 +176,7 @@ impl OperatorQuestions {
|
|||
}
|
||||
conn.execute(
|
||||
"UPDATE operator_questions SET answer = ?1, answered_at = ?2 WHERE id = ?3",
|
||||
params![answer, now_unix(), id],
|
||||
params![answer, Utc::now().timestamp(), id],
|
||||
)?;
|
||||
Ok((question, asker, target))
|
||||
}
|
||||
|
|
@ -225,7 +224,7 @@ impl OperatorQuestions {
|
|||
let sentinel = format!("[cancelled by {canceller}]");
|
||||
conn.execute(
|
||||
"UPDATE operator_questions SET answer = ?1, answered_at = ?2 WHERE id = ?3",
|
||||
params![sentinel, now_unix(), id],
|
||||
params![sentinel, Utc::now().timestamp(), id],
|
||||
)?;
|
||||
Ok((question, asker, target))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue