fixes #29 (time formating)
This commit is contained in:
parent
0687f44137
commit
de2cc48f88
1 changed files with 2 additions and 2 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue