diff options
author | Kousik Mitra <kousikmitra12@gmail.com> | 2020-04-18 12:49:29 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 15:19:29 +0800 |
commit | fc57c921b1716f0f84b5b2d4d5693091c48a4b2d (patch) | |
tree | 120c23f5c6be2f6f9176a023a177cede08f6b014 /internal | |
parent | 7b295378e4e3c22e355a5ecb0ce0beb060438584 (diff) |
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>
Diffstat (limited to 'internal')
-rw-r--r-- | internal/conf/conf.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/conf/conf.go b/internal/conf/conf.go index 0f685483..5a16951e 100644 --- a/internal/conf/conf.go +++ b/internal/conf/conf.go @@ -294,7 +294,7 @@ func Init(customConf string) error { "StampNano": time.StampNano, }[Time.Format] if Time.FormatLayout == "" { - return fmt.Errorf("unrecognized '[time] FORMAT': %s", Time.Format) + Time.FormatLayout = time.RFC3339 } // **************************** |