From 417de073860e44d0cff220265ab6e494efe5ac14 Mon Sep 17 00:00:00 2001 From: Renan Lukas <14964993+RenanLukas@users.noreply.github.com> Date: Mon, 15 Jan 2024 20:41:11 -0300 Subject: [PATCH] Add datetime function to getOldestPubDateInFeed sorting --- .../java/org/wordpress/android/datasets/ReaderPostTable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/src/main/java/org/wordpress/android/datasets/ReaderPostTable.java b/WordPress/src/main/java/org/wordpress/android/datasets/ReaderPostTable.java index 7f0e3df6b9a2..bf0ab39f10e3 100644 --- a/WordPress/src/main/java/org/wordpress/android/datasets/ReaderPostTable.java +++ b/WordPress/src/main/java/org/wordpress/android/datasets/ReaderPostTable.java @@ -665,7 +665,7 @@ public static String getOldestPubDateInBlog(long blogId) { public static String getOldestPubDateInFeed(long feedId) { String sql = "SELECT date_published FROM tbl_posts" + " WHERE feed_id=? AND tag_name='' AND tag_type=0" - + " ORDER BY date_published LIMIT 1"; + + " ORDER BY datetime(date_published) LIMIT 1"; return SqlUtils.stringForQuery(ReaderDatabase.getReadableDb(), sql, new String[]{Long.toString(feedId)}); }