mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-17 03:42:26 +08:00
fix: time location
This commit is contained in:
2
pkg/cache/cache.go
vendored
2
pkg/cache/cache.go
vendored
@@ -533,7 +533,7 @@ func (c *Cache) regeneratePages() {
|
|||||||
buf.WriteString(fmt.Sprintf("\n### %s\n\n", t.Format("2006年1月")))
|
buf.WriteString(fmt.Sprintf("\n### %s\n\n", t.Format("2006年1月")))
|
||||||
}
|
}
|
||||||
for i, article := range archive.Articles {
|
for i, article := range archive.Articles {
|
||||||
createdAt := article.CreatedAt.In(time.Location)
|
createdAt := article.CreatedAt.In(tools.TimeLocation)
|
||||||
if i == 0 && gt12Month {
|
if i == 0 && gt12Month {
|
||||||
str := fmt.Sprintf(`* *[%s](/post/%s.html) <span class="date">(%s)</span>`,
|
str := fmt.Sprintf(`* *[%s](/post/%s.html) <span class="date">(%s)</span>`,
|
||||||
article.Title, article.Slug, createdAt.Format("Jan 02, 2006"))
|
article.Title, article.Slug, createdAt.Format("Jan 02, 2006"))
|
||||||
|
|||||||
Reference in New Issue
Block a user