From bbe0fe93397cb8c6e000bf5a25b5a608546866ff Mon Sep 17 00:00:00 2001 From: Renan Lukas <14964993+RenanLukas@users.noreply.github.com> Date: Mon, 15 Jan 2024 20:43:34 -0300 Subject: [PATCH] Add datetime function to getPostsInFeed 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 4d2ab0fab2bb..390d6796ced8 100644 --- a/WordPress/src/main/java/org/wordpress/android/datasets/ReaderPostTable.java +++ b/WordPress/src/main/java/org/wordpress/android/datasets/ReaderPostTable.java @@ -1020,7 +1020,7 @@ public static ReaderPostList getPostsInFeed(long feedId, int maxPosts, boolean e String columns = (excludeTextColumn ? COLUMN_NAMES_NO_TEXT : "*"); String sql = "SELECT " + columns + " FROM tbl_posts WHERE feed_id=? AND tag_name='' AND tag_type=0" - + " ORDER BY date_published DESC"; + + " ORDER BY datetime(date_published) DESC"; if (maxPosts > 0) { sql += " LIMIT " + maxPosts;