We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38a7b6b commit 4776f62Copy full SHA for 4776f62
replacer.go
@@ -319,7 +319,10 @@ func globalDefaultReplacements(key string) (any, bool) {
319
case "time.now":
320
return nowFunc(), true
321
case "time.now.http":
322
- return nowFunc().Format(http.TimeFormat), true
+ // According to the comment for http.TimeFormat, the timezone must be in UTC
323
+ // to generate the correct format.
324
+ // https://github.com/caddyserver/caddy/issues/5773
325
+ return nowFunc().UTC().Format(http.TimeFormat), true
326
case "time.now.common_log":
327
return nowFunc().Format("02/Jan/2006:15:04:05 -0700"), true
328
case "time.now.year":
0 commit comments