Display timestamp human readable
This commit is contained in:
@@ -2,6 +2,10 @@ use anyhow::{
|
||||
Context,
|
||||
Result,
|
||||
};
|
||||
use chrono::{
|
||||
DateTime,
|
||||
Utc,
|
||||
};
|
||||
use crate::utils::{
|
||||
urlencode,
|
||||
};
|
||||
@@ -147,6 +151,13 @@ impl RevisionRow {
|
||||
None => String::from("#"),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn last_modified_time(&self) -> Option<DateTime<Utc>> {
|
||||
match &self.last_modified {
|
||||
Some(last_modified) => DateTime::from_timestamp(last_modified.clone(), 0),
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(FromRow)]
|
||||
|
Reference in New Issue
Block a user