@@ -65,72 +65,72 @@ func TestParsePatchIdentity(t *testing.T) {
6565}
6666
6767func TestParsePatchDate (t * testing.T ) {
68- expected := time .Date (2020 , 04 , 11 , 22 , 21 , 23 , 0 , time .UTC )
68+ expected := time .Date (2020 , 4 , 9 , 8 , 7 , 6 , 0 , time .UTC )
6969
7070 tests := map [string ]struct {
7171 Input string
7272 Output PatchDate
7373 }{
7474 "default" : {
75- Input : "Sat Apr 11 15:21:23 2020 -0700" ,
75+ Input : "Thu Apr 9 01:07:06 2020 -0700" ,
7676 Output : PatchDate {
7777 Parsed : expected ,
78- Raw : "Sat Apr 11 15:21:23 2020 -0700" ,
78+ Raw : "Thu Apr 9 01:07:06 2020 -0700" ,
7979 },
8080 },
8181 "defaultLocal" : {
82- Input : "Sat Apr 11 15:21:23 2020" ,
82+ Input : "Thu Apr 9 01:07:06 2020" ,
8383 Output : PatchDate {
84- Parsed : time .Date (2020 , 04 , 11 , 15 , 21 , 23 , 0 , time .Local ),
85- Raw : "Sat Apr 11 15:21:23 2020" ,
84+ Parsed : time .Date (2020 , 4 , 9 , 1 , 7 , 6 , 0 , time .Local ),
85+ Raw : "Thu Apr 9 01:07:06 2020" ,
8686 },
8787 },
8888 "iso" : {
89- Input : "2020-04-11 15:21:23 -0700" ,
89+ Input : "2020-04-09 01:07:06 -0700" ,
9090 Output : PatchDate {
9191 Parsed : expected ,
92- Raw : "2020-04-11 15:21:23 -0700" ,
92+ Raw : "2020-04-09 01:07:06 -0700" ,
9393 },
9494 },
9595 "isoStrict" : {
96- Input : "2020-04-11T15:21:23 -07:00" ,
96+ Input : "2020-04-09T01:07:06 -07:00" ,
9797 Output : PatchDate {
9898 Parsed : expected ,
99- Raw : "2020-04-11T15:21:23 -07:00" ,
99+ Raw : "2020-04-09T01:07:06 -07:00" ,
100100 },
101101 },
102102 "rfc" : {
103- Input : "Sat, 11 Apr 2020 15:21:23 -0700" ,
103+ Input : "Thu, 9 Apr 2020 01:07:06 -0700" ,
104104 Output : PatchDate {
105105 Parsed : expected ,
106- Raw : "Sat, 11 Apr 2020 15:21:23 -0700" ,
106+ Raw : "Thu, 9 Apr 2020 01:07:06 -0700" ,
107107 },
108108 },
109109 "short" : {
110- Input : "2020-04-11 " ,
110+ Input : "2020-04-09 " ,
111111 Output : PatchDate {
112- Parsed : time .Date (2020 , 04 , 11 , 0 , 0 , 0 , 0 , time .Local ),
113- Raw : "2020-04-11 " ,
112+ Parsed : time .Date (2020 , 4 , 9 , 0 , 0 , 0 , 0 , time .Local ),
113+ Raw : "2020-04-09 " ,
114114 },
115115 },
116116 "raw" : {
117- Input : "1586643683 -0700" ,
117+ Input : "1586419626 -0700" ,
118118 Output : PatchDate {
119119 Parsed : expected ,
120- Raw : "1586643683 -0700" ,
120+ Raw : "1586419626 -0700" ,
121121 },
122122 },
123123 "unix" : {
124- Input : "1586643683 " ,
124+ Input : "1586419626 " ,
125125 Output : PatchDate {
126126 Parsed : expected ,
127- Raw : "1586643683 " ,
127+ Raw : "1586419626 " ,
128128 },
129129 },
130130 "unknownFormat" : {
131- Input : "4/11 /2020 15:21:23 PDT" ,
131+ Input : "4/9 /2020 01:07:06 PDT" ,
132132 Output : PatchDate {
133- Raw : "4/11 /2020 15:21:23 PDT" ,
133+ Raw : "4/9 /2020 01:07:06 PDT" ,
134134 },
135135 },
136136 "empty" : {
0 commit comments