mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
committed by
Bjørn Erik Pedersen
parent
f2946da9e8
commit
e77ca3c105
@@ -28,6 +28,7 @@ func init() {
|
||||
if d.Language == nil {
|
||||
panic("Language must be set")
|
||||
}
|
||||
|
||||
ctx := New(langs.GetTimeFormatter(d.Language), langs.GetLocation(d.Language))
|
||||
|
||||
ns := &internal.TemplateFuncsNamespace{
|
||||
|
@@ -68,9 +68,9 @@ func (ns *Namespace) Format(layout string, v any) (string, error) {
|
||||
return ns.timeFormatter.Format(t, layout), nil
|
||||
}
|
||||
|
||||
// Now returns the current local time.
|
||||
// Now returns the current local time or `clock` time
|
||||
func (ns *Namespace) Now() _time.Time {
|
||||
return _time.Now()
|
||||
return htime.Now()
|
||||
}
|
||||
|
||||
// ParseDuration parses the duration string s.
|
||||
|
Reference in New Issue
Block a user