1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-11-22 12:01:08 +00:00

Should use Utc::now for last_refreshed_at

This commit is contained in:
Felix Ableitner 2024-11-08 12:53:47 +01:00
parent 5d47bb96ba
commit 026c8c81f2
4 changed files with 8 additions and 8 deletions

View file

@ -14,7 +14,7 @@ use activitypub_federation::{
http_signatures::generate_actor_keypair,
};
use bcrypt::{hash, DEFAULT_COST};
use chrono::{DateTime, Local, Utc};
use chrono::{DateTime, Utc};
use diesel::{
insert_into,
AsChangeset,
@ -83,7 +83,7 @@ impl DbPerson {
inbox_url,
public_key: keypair.public_key,
private_key: Some(keypair.private_key),
last_refreshed_at: Local::now().into(),
last_refreshed_at: Utc::now(),
local: true,
};

View file

@ -13,7 +13,7 @@ use activitypub_federation::{
protocol::{public_key::PublicKey, verification::verify_domains_match},
traits::{ActivityHandler, Actor, Object},
};
use chrono::{DateTime, Local, Utc};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use std::fmt::Debug;
use url::Url;
@ -110,7 +110,7 @@ impl Object for DbInstance {
inbox_url: json.inbox.to_string(),
public_key: json.public_key.public_key_pem,
private_key: None,
last_refreshed_at: Local::now().into(),
last_refreshed_at: Utc::now(),
local: false,
};
let instance = DbInstance::create(&form, data)?;

View file

@ -12,7 +12,7 @@ use activitypub_federation::{
protocol::{public_key::PublicKey, verification::verify_domains_match},
traits::{Actor, Object},
};
use chrono::{DateTime, Local, Utc};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use std::fmt::Debug;
use url::Url;
@ -71,7 +71,7 @@ impl Object for DbPerson {
inbox_url: json.inbox.to_string(),
public_key: json.public_key.public_key_pem,
private_key: None,
last_refreshed_at: Local::now().into(),
last_refreshed_at: Utc::now(),
local: false,
};
DbPerson::create(&form, data)

View file

@ -32,7 +32,7 @@ use axum::{
ServiceExt,
};
use axum_macros::debug_middleware;
use chrono::Local;
use chrono::Utc;
use diesel::{
r2d2::{ConnectionManager, Pool},
PgConnection,
@ -133,7 +133,7 @@ async fn setup(data: &Data<IbisData>) -> Result<(), Error> {
inbox_url,
public_key: keypair.public_key,
private_key: Some(keypair.private_key),
last_refreshed_at: Local::now().into(),
last_refreshed_at: Utc::now(),
local: true,
};
let instance = DbInstance::create(&form, data)?;