diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java index c870e35de..849110a22 100644 --- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java +++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java @@ -1193,7 +1193,7 @@ public class PodDBAdapter { + TABLE_NAME_FEED_MEDIA + "." + KEY_POSITION + "> 0"; } final String timeFilter = lastPlayedTime + ">=" + timeFilterFrom - + " AND " + lastPlayedTime + "<=" + timeFilterTo; + + " AND " + lastPlayedTime + "<" + timeFilterTo; String playedTime = TABLE_NAME_FEED_MEDIA + "." + KEY_PLAYED_DURATION; if (includeMarkedAsPlayed) { playedTime = "(CASE WHEN " + playedTime + " != 0" diff --git a/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/subscriptions/StatisticsFilterDialog.java b/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/subscriptions/StatisticsFilterDialog.java index 8efdcf603..077883321 100644 --- a/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/subscriptions/StatisticsFilterDialog.java +++ b/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/subscriptions/StatisticsFilterDialog.java @@ -107,6 +107,10 @@ public class StatisticsFilterDialog { private Pair makeMonthlyList(long oldestDate, boolean inclusive) { Calendar date = Calendar.getInstance(); date.setTimeInMillis(oldestDate); + date.set(Calendar.HOUR_OF_DAY, 0); + date.set(Calendar.MINUTE, 0); + date.set(Calendar.SECOND, 0); + date.set(Calendar.MILLISECOND, 0); date.set(Calendar.DAY_OF_MONTH, 1); ArrayList names = new ArrayList<>(); ArrayList timestamps = new ArrayList<>();