Skip to content

Commit

Permalink
Add datetime function to getPostsInFeed sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
RenanLukas committed Jan 15, 2024
1 parent 10b9f80 commit bbe0fe9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bbe0fe9

Please sign in to comment.