mirror of https://github.com/gogs/gogs.git
conf: fallback time layout to RFC 3339 when misconfigured (#6120)
* Fix: fallback to default time format if misconfigured (#6098) * Update CHANGELOG.md Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>pull/6122/head
parent
7b295378e4
commit
fc57c921b1
|
@ -52,6 +52,7 @@ All notable changes to Gogs are documented in this file.
|
||||||
- Enable Federated Avatar Lookup could cause server to crash. [#5848](https://github.com/gogs/gogs/issues/5848)
|
- Enable Federated Avatar Lookup could cause server to crash. [#5848](https://github.com/gogs/gogs/issues/5848)
|
||||||
- Private repositories are hidden in the organization's view. [#5869](https://github.com/gogs/gogs/issues/5869)
|
- Private repositories are hidden in the organization's view. [#5869](https://github.com/gogs/gogs/issues/5869)
|
||||||
- Server error when changing email address in user settings page. [#5899](https://github.com/gogs/gogs/issues/5899)
|
- Server error when changing email address in user settings page. [#5899](https://github.com/gogs/gogs/issues/5899)
|
||||||
|
- Fall back to use RFC 3339 as time layout when misconfigured. [#6098](https://github.com/gogs/gogs/issues/6098)
|
||||||
- Webhooks are not fired after push when `[service] REQUIRE_SIGNIN_VIEW = true`.
|
- Webhooks are not fired after push when `[service] REQUIRE_SIGNIN_VIEW = true`.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
|
@ -294,7 +294,7 @@ func Init(customConf string) error {
|
||||||
"StampNano": time.StampNano,
|
"StampNano": time.StampNano,
|
||||||
}[Time.Format]
|
}[Time.Format]
|
||||||
if Time.FormatLayout == "" {
|
if Time.FormatLayout == "" {
|
||||||
return fmt.Errorf("unrecognized '[time] FORMAT': %s", Time.Format)
|
Time.FormatLayout = time.RFC3339
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************
|
// ****************************
|
||||||
|
|
Loading…
Reference in New Issue