Add 24 hours to account for the entire rest of the end day (#2698)

This commit is contained in:
Stefan Benten 2019-08-02 10:27:36 -04:00 committed by GitHub
parent 471b46c0cd
commit 8532625f85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)