@@ -50,8 +50,8 @@ func Test_parseInsightsStartAndEndTime(t *testing.T) {
50
50
startTime : today .Format (layout ),
51
51
endTime : thisHour .Format (layout ),
52
52
},
53
- wantStartTime : time .Date (2023 , 7 , today .Day (), 0 , 0 , 0 , 0 , time .UTC ),
54
- wantEndTime : time .Date (2023 , 7 , today .Day (), thisHour .Hour (), 0 , 0 , 0 , time .UTC ),
53
+ wantStartTime : time .Date (today . Year (), today . Month () , today .Day (), 0 , 0 , 0 , 0 , time .UTC ),
54
+ wantEndTime : time .Date (today . Year (), today . Month () , today .Day (), thisHour .Hour (), 0 , 0 , 0 , time .UTC ),
55
55
wantOk : true ,
56
56
},
57
57
{
@@ -68,8 +68,8 @@ func Test_parseInsightsStartAndEndTime(t *testing.T) {
68
68
startTime : today .Format (layout ),
69
69
endTime : thisHourRoundUp .Format (layout ),
70
70
},
71
- wantStartTime : time .Date (2023 , 7 , today .Day (), 0 , 0 , 0 , 0 , time .UTC ),
72
- wantEndTime : time .Date (2023 , 7 , thisHourRoundUp .Day (), thisHourRoundUp .Hour (), 0 , 0 , 0 , time .UTC ),
71
+ wantStartTime : time .Date (today . Year (), today . Month () , today .Day (), 0 , 0 , 0 , 0 , time .UTC ),
72
+ wantEndTime : time .Date (today . Year (), today . Month () , thisHourRoundUp .Day (), thisHourRoundUp .Hour (), 0 , 0 , 0 , time .UTC ),
73
73
wantOk : true ,
74
74
},
75
75
{
0 commit comments