Add workaround for parsing an invalid date
This commit is contained in:
parent
ad66250734
commit
bfb96d536e
2 changed files with 2 additions and 0 deletions
|
@ -156,6 +156,7 @@ var dateFormats = []string{
|
|||
"2006-01-02T15:04:05 -0700",
|
||||
"2006-01-02T15:04:05:00",
|
||||
"2006-01-02T15:04:05",
|
||||
"2006-01-02T15:04",
|
||||
"2006-01-02 at 15:04:05",
|
||||
"2006-01-02 15:04:05Z",
|
||||
"2006-01-02 15:04:05 MST",
|
||||
|
|
|
@ -132,6 +132,7 @@ func TestParseWeirdDateFormat(t *testing.T) {
|
|||
"March 30 2020 07:02:38 PM",
|
||||
"Mon, 30 Mar 2020 19:53 +0000",
|
||||
"Mon, 03/30/2020 - 19:19",
|
||||
"2018-12-12T12:12",
|
||||
}
|
||||
|
||||
for _, date := range dates {
|
||||
|
|
Loading…
Reference in a new issue