hive-sh4re: delete now_unix(), the migration's last call sites are gone
This commit is contained in:
parent
9293c5d580
commit
9f5ce4d941
3 changed files with 10 additions and 13 deletions
|
|
@ -15,17 +15,13 @@ pub fn from_secs(secs: i64) -> DateTime<Utc> {
|
|||
DateTime::<Utc>::from_timestamp(secs, 0).unwrap_or_default()
|
||||
}
|
||||
|
||||
/// Current unix timestamp in seconds — the single definition behind
|
||||
/// every store's `created_at` / `sent_at` / … stamp (this module owns
|
||||
/// the epoch-seconds convention; a dozen local copies of this fn used
|
||||
/// to float around both binaries). Uses chrono's `clock` feature
|
||||
/// (already pulled in workspace-wide) instead of hand-rolled
|
||||
/// `SystemTime` math, consistent with every other timestamp in this
|
||||
/// module being a `chrono` type.
|
||||
#[must_use]
|
||||
pub fn now_unix() -> i64 {
|
||||
Utc::now().timestamp()
|
||||
}
|
||||
// `now_unix()` (a hand-rolled-`SystemTime`-math-turned-`chrono` helper
|
||||
// that every store used to call for its `created_at` / `sent_at` / …
|
||||
// stamps) has been removed — every call site now uses
|
||||
// `chrono::Utc::now()` directly, either as a `DateTime<Utc>` struct
|
||||
// field or via `.timestamp()` for the ephemeral i64-typed (sqlite
|
||||
// bind / cutoff arithmetic) call sites. hivectl's own separate
|
||||
// `now_unix()` copy in `dag_progress.rs` is unrelated and untouched.
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
|
|
|||
Loading…
Reference in a new issue