Add 24 hours to account for the entire rest of the end day (#2698)
This commit is contained in:
parent
471b46c0cd
commit
8532625f85
@ -221,6 +221,9 @@ func cmdNodeUsage(cmd *cobra.Command, args []string) (err error) {
|
||||
return errs.New("Invalid date format. Please use YYYY-MM-DD")
|
||||
}
|
||||
|
||||
//Adding one day to properly account for the entire end day
|
||||
end = end.Add(time.Hour * 24)
|
||||
|
||||
// Ensure that start date is not after end date
|
||||
if start.After(end) {
|
||||
return errs.New("Invalid time period (%v) - (%v)", start, end)
|
||||
|
Loading…
Reference in New Issue
Block a user