diff --git a/src/backend/database/user.rs b/src/backend/database/user.rs index 81bd795..c493fd6 100644 --- a/src/backend/database/user.rs +++ b/src/backend/database/user.rs @@ -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, }; diff --git a/src/backend/federation/objects/instance.rs b/src/backend/federation/objects/instance.rs index 8c25f1f..b574d2b 100644 --- a/src/backend/federation/objects/instance.rs +++ b/src/backend/federation/objects/instance.rs @@ -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)?; diff --git a/src/backend/federation/objects/user.rs b/src/backend/federation/objects/user.rs index e04c14b..cd67322 100644 --- a/src/backend/federation/objects/user.rs +++ b/src/backend/federation/objects/user.rs @@ -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) diff --git a/src/backend/mod.rs b/src/backend/mod.rs index 93ad456..4bec3e3 100644 --- a/src/backend/mod.rs +++ b/src/backend/mod.rs @@ -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) -> 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)?;