Add timezone support for front matter dates without one

Fixes #8810
This commit is contained in:
Bjørn Erik Pedersen
2021-07-27 13:45:05 +02:00
parent a57dda854b
commit efa5760db5
10 changed files with 196 additions and 73 deletions

View File

@@ -22,6 +22,8 @@ import (
"sync"
"time"
"github.com/gohugoio/hugo/langs"
"github.com/gobuffalo/flect"
"github.com/gohugoio/hugo/markup/converter"
@@ -396,6 +398,7 @@ func (pm *pageMeta) setMetadata(parentBucket *pagesMapBucket, p *pageState, fron
BaseFilename: contentBaseName,
ModTime: mtime,
GitAuthorDate: gitAuthorDate,
Location: langs.GetLocation(pm.s.Language()),
}
// Handle the date separately