From e3c36a95fdce9dcf00dcf80761faede5422b479d Mon Sep 17 00:00:00 2001 From: woon Date: Fri, 21 Apr 2023 14:13:23 +0800 Subject: [PATCH] update --- handler/article.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handler/article.go b/handler/article.go index 331877d..b10c89e 100644 --- a/handler/article.go +++ b/handler/article.go @@ -60,7 +60,7 @@ func (a *Article) GetArticleByPath(path string) (*Article, error) { t, err := time.Parse("2006-1-2 15:04", articleConf["date"]) if err == nil { a.Conf.Time = t.Unix() - a.Date = time.Unix(a.Conf.Time, 0).Format("2006-01-02 15:04") + a.Date = time.Unix(a.Conf.Time, 0).Format("2006-01-02") } } @@ -76,7 +76,7 @@ func (a *Article) GetArticleByPath(path string) (*Article, error) { mtime := info.ModTime() a.Conf.Time = mtime.Unix() a.Content = parts[0] - a.Date = time.Unix(a.Conf.Time, 0).Format("2006-01-02 15:04") + a.Date = time.Unix(a.Conf.Time, 0).Format("2006-01-02") } return a, nil }