Make it easier to debug date parsing errors
When message dates failed to parse, the error displayed would try to include the time object it failed to obtain, which would display as something like 0001-01-01 00:00:00 UTC, which isn't of much help. Instead, display the text we were trying to parse into a date, which makes the problem easier to debug.
This commit is contained in:
parent
6401b105cb
commit
cc44027545
1 changed files with 1 additions and 1 deletions
|
@ -178,7 +178,7 @@ func parseDate(h *mail.Header) (time.Time, error) {
|
|||
return t, nil
|
||||
}
|
||||
}
|
||||
return time.Time{}, fmt.Errorf("unrecognized date format: %s", t)
|
||||
return time.Time{}, fmt.Errorf("unrecognized date format: %s", text)
|
||||
}
|
||||
|
||||
func parseAddressList(h *mail.Header, key string) ([]*models.Address, error) {
|
||||
|
|
Loading…
Reference in a new issue