From 10bb2a614ff451b4e75b5eecd5e2700f97a98d3b Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Wed, 4 Jan 2023 19:12:39 -0500 Subject: [PATCH] Use local timezone for generated at date --- src/generator/util/templates.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generator/util/templates.rs b/src/generator/util/templates.rs index 8f065b5..082dca9 100644 --- a/src/generator/util/templates.rs +++ b/src/generator/util/templates.rs @@ -1,5 +1,5 @@ use crate::activitypub::DOMAIN; -use chrono::{DateTime, Utc}; +use chrono::{DateTime, Local}; use once_cell::sync::Lazy; use std::time::SystemTime; @@ -10,7 +10,7 @@ static CB: Lazy = Lazy::new(|| { .as_secs() }); -static GENERATED_AT: Lazy> = Lazy::new(|| Utc::now()); +static GENERATED_AT: Lazy> = Lazy::new(|| Local::now()); pub trait TemplateCommon { fn domain() -> String { @@ -32,7 +32,7 @@ pub trait TemplateCommon { ) } - fn generated_at() -> &'static DateTime { + fn generated_at() -> &'static DateTime { &*GENERATED_AT } }