Use local timezone for generated at date
This commit is contained in:
parent
57b2d5f034
commit
10bb2a614f
|
@ -1,5 +1,5 @@
|
||||||
use crate::activitypub::DOMAIN;
|
use crate::activitypub::DOMAIN;
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Local};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use std::time::SystemTime;
|
use std::time::SystemTime;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ static CB: Lazy<u64> = Lazy::new(|| {
|
||||||
.as_secs()
|
.as_secs()
|
||||||
});
|
});
|
||||||
|
|
||||||
static GENERATED_AT: Lazy<DateTime<Utc>> = Lazy::new(|| Utc::now());
|
static GENERATED_AT: Lazy<DateTime<Local>> = Lazy::new(|| Local::now());
|
||||||
|
|
||||||
pub trait TemplateCommon {
|
pub trait TemplateCommon {
|
||||||
fn domain() -> String {
|
fn domain() -> String {
|
||||||
|
@ -32,7 +32,7 @@ pub trait TemplateCommon {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generated_at() -> &'static DateTime<Utc> {
|
fn generated_at() -> &'static DateTime<Local> {
|
||||||
&*GENERATED_AT
|
&*GENERATED_AT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue