diff --git a/SolarPower/Repository/Implement/OverviewRepository.cs b/SolarPower/Repository/Implement/OverviewRepository.cs index 0de6831..8f8c63a 100644 --- a/SolarPower/Repository/Implement/OverviewRepository.cs +++ b/SolarPower/Repository/Implement/OverviewRepository.cs @@ -404,7 +404,7 @@ namespace SolarPower.Repository.Implement post.StartTime = post.Range.Split('-')[0] + " 00:00:00"; post.EndTime = post.Range.Split('-')[1] + " 23:59:59"; start = Convert.ToDateTime(post.StartTime); - end = Convert.ToDateTime(post.EndTime); + end = Convert.ToDateTime(post.EndTime).AddDays(-1); var startime = (Int64)(start.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; var endtime = (Int64)(end.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; sql += @$" AND `timestamp` BETWEEN {startime*1000} AND {endtime*1000}";