Skip to content

Commit baae90e

Browse files
zeripathtechknowlogick
authored andcommitted
Allow incompletely specified Time Formats (#8816)
* Allow incompletely specified time formats * Adjust error reporting slightly * Update setting.go
1 parent be06dee commit baae90e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/setting/setting.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,8 @@ func NewContext() {
835835
TimeFormat = timeFormatKey
836836
TestTimeFormat, _ := time.Parse(TimeFormat, TimeFormat)
837837
if TestTimeFormat.Format(time.RFC3339) != "2006-01-02T15:04:05Z" {
838-
log.Fatal("Can't create time properly, please check your time format has 2006, 01, 02, 15, 04 and 05")
838+
log.Warn("Provided TimeFormat: %s does not create a fully specified date and time.", TimeFormat)
839+
log.Warn("In order to display dates and times correctly please check your time format has 2006, 01, 02, 15, 04 and 05")
839840
}
840841
log.Trace("Custom TimeFormat: %s", TimeFormat)
841842
}

0 commit comments

Comments
 (0)