fixes #29 (time formating)

This commit is contained in:
dvdsk 2022-07-13 23:54:48 +02:00
parent 0687f44137
commit de2cc48f88
No known key found for this signature in database
GPG key ID: 6CF9D20C5709A836

View file

@ -27,7 +27,7 @@ impl Pasta {
pub fn created_as_string(&self) -> String {
let date = DateTime::<Utc>::from_utc(NaiveDateTime::from_timestamp(self.created, 0), Utc);
format!(
"{:02}-{:02} {}:{}",
"{:02}-{:02} {:02}:{:02}",
date.month(),
date.day(),
date.hour(),
@ -42,7 +42,7 @@ impl Pasta {
let date =
DateTime::<Utc>::from_utc(NaiveDateTime::from_timestamp(self.expiration, 0), Utc);
format!(
"{:02}-{:02} {}:{}",
"{:02}-{:02} {:02}:{:02}",
date.month(),
date.day(),
date.hour(),