Skip to content

Commit

Permalink
Add datetime function to getPostsInBlog sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
RenanLukas committed Jan 15, 2024
1 parent 417de07 commit 10b9f80
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ public static ReaderPostList getPostsInBlog(long blogId, int maxPosts, boolean e
String columns = (excludeTextColumn ? COLUMN_NAMES_NO_TEXT : "*");
String sql =
"SELECT " + columns + " FROM tbl_posts WHERE blog_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 10b9f80

Please sign in to comment.