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 {
|
pub fn created_as_string(&self) -> String {
|
||||||
let date = DateTime::<Utc>::from_utc(NaiveDateTime::from_timestamp(self.created, 0), Utc);
|
let date = DateTime::<Utc>::from_utc(NaiveDateTime::from_timestamp(self.created, 0), Utc);
|
||||||
format!(
|
format!(
|
||||||
"{:02}-{:02} {}:{}",
|
"{:02}-{:02} {:02}:{:02}",
|
||||||
date.month(),
|
date.month(),
|
||||||
date.day(),
|
date.day(),
|
||||||
date.hour(),
|
date.hour(),
|
||||||
|
@ -42,7 +42,7 @@ impl Pasta {
|
||||||
let date =
|
let date =
|
||||||
DateTime::<Utc>::from_utc(NaiveDateTime::from_timestamp(self.expiration, 0), Utc);
|
DateTime::<Utc>::from_utc(NaiveDateTime::from_timestamp(self.expiration, 0), Utc);
|
||||||
format!(
|
format!(
|
||||||
"{:02}-{:02} {}:{}",
|
"{:02}-{:02} {:02}:{:02}",
|
||||||
date.month(),
|
date.month(),
|
||||||
date.day(),
|
date.day(),
|
||||||
date.hour(),
|
date.hour(),
|
||||||
|
|
Loading…
Reference in a new issue