update
This commit is contained in:
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user