summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-12-08 21:25:00 +0000
committertechknowlogick <techknowlogick@gitea.io>2019-12-08 16:25:00 -0500
commitbaae90e163d78016129489c5123c50b28adeec90 (patch)
tree14eecdc4c141699b479f46acb2fbe47cb57d371e /modules/setting
parentbe06dee04ce46de2da222fc9b2be4fc3b68b816d (diff)
downloadgitea-baae90e163d78016129489c5123c50b28adeec90.tar.gz
gitea-baae90e163d78016129489c5123c50b28adeec90.zip
Allow incompletely specified Time Formats (#8816)
* Allow incompletely specified time formats * Adjust error reporting slightly * Update setting.go
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index f55833a0e0..832403e20f 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -835,7 +835,8 @@ func NewContext() {
TimeFormat = timeFormatKey
TestTimeFormat, _ := time.Parse(TimeFormat, TimeFormat)
if TestTimeFormat.Format(time.RFC3339) != "2006-01-02T15:04:05Z" {
- log.Fatal("Can't create time properly, please check your time format has 2006, 01, 02, 15, 04 and 05")
+ log.Warn("Provided TimeFormat: %s does not create a fully specified date and time.", TimeFormat)
+ log.Warn("In order to display dates and times correctly please check your time format has 2006, 01, 02, 15, 04 and 05")
}
log.Trace("Custom TimeFormat: %s", TimeFormat)
}