@@ -65,72 +65,72 @@ func TestParsePatchIdentity(t *testing.T) {
65
65
}
66
66
67
67
func 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 )
69
69
70
70
tests := map [string ]struct {
71
71
Input string
72
72
Output PatchDate
73
73
}{
74
74
"default" : {
75
- Input : "Sat Apr 11 15:21:23 2020 -0700" ,
75
+ Input : "Thu Apr 9 01:07:06 2020 -0700" ,
76
76
Output : PatchDate {
77
77
Parsed : expected ,
78
- Raw : "Sat Apr 11 15:21:23 2020 -0700" ,
78
+ Raw : "Thu Apr 9 01:07:06 2020 -0700" ,
79
79
},
80
80
},
81
81
"defaultLocal" : {
82
- Input : "Sat Apr 11 15:21:23 2020" ,
82
+ Input : "Thu Apr 9 01:07:06 2020" ,
83
83
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" ,
86
86
},
87
87
},
88
88
"iso" : {
89
- Input : "2020-04-11 15:21:23 -0700" ,
89
+ Input : "2020-04-09 01:07:06 -0700" ,
90
90
Output : PatchDate {
91
91
Parsed : expected ,
92
- Raw : "2020-04-11 15:21:23 -0700" ,
92
+ Raw : "2020-04-09 01:07:06 -0700" ,
93
93
},
94
94
},
95
95
"isoStrict" : {
96
- Input : "2020-04-11T15:21:23 -07:00" ,
96
+ Input : "2020-04-09T01:07:06 -07:00" ,
97
97
Output : PatchDate {
98
98
Parsed : expected ,
99
- Raw : "2020-04-11T15:21:23 -07:00" ,
99
+ Raw : "2020-04-09T01:07:06 -07:00" ,
100
100
},
101
101
},
102
102
"rfc" : {
103
- Input : "Sat, 11 Apr 2020 15:21:23 -0700" ,
103
+ Input : "Thu, 9 Apr 2020 01:07:06 -0700" ,
104
104
Output : PatchDate {
105
105
Parsed : expected ,
106
- Raw : "Sat, 11 Apr 2020 15:21:23 -0700" ,
106
+ Raw : "Thu, 9 Apr 2020 01:07:06 -0700" ,
107
107
},
108
108
},
109
109
"short" : {
110
- Input : "2020-04-11 " ,
110
+ Input : "2020-04-09 " ,
111
111
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 " ,
114
114
},
115
115
},
116
116
"raw" : {
117
- Input : "1586643683 -0700" ,
117
+ Input : "1586419626 -0700" ,
118
118
Output : PatchDate {
119
119
Parsed : expected ,
120
- Raw : "1586643683 -0700" ,
120
+ Raw : "1586419626 -0700" ,
121
121
},
122
122
},
123
123
"unix" : {
124
- Input : "1586643683 " ,
124
+ Input : "1586419626 " ,
125
125
Output : PatchDate {
126
126
Parsed : expected ,
127
- Raw : "1586643683 " ,
127
+ Raw : "1586419626 " ,
128
128
},
129
129
},
130
130
"unknownFormat" : {
131
- Input : "4/11 /2020 15:21:23 PDT" ,
131
+ Input : "4/9 /2020 01:07:06 PDT" ,
132
132
Output : PatchDate {
133
- Raw : "4/11 /2020 15:21:23 PDT" ,
133
+ Raw : "4/9 /2020 01:07:06 PDT" ,
134
134
},
135
135
},
136
136
"empty" : {
0 commit comments