Index: backend/controllers/forumController.js
===================================================================
--- backend/controllers/forumController.js	(revision a900ddb5758880fc32d5c2401cad850e6f4d88ac)
+++ backend/controllers/forumController.js	(revision fae62778184fe587f3cb4d196752e6171a9525a6)
@@ -260,5 +260,5 @@
         sort === 'past-month' ||
         sort == 'past-year' ||
-        topic == 'daily-challenge' ||
+        topic ||
         search) &&
       !commentSort
Index: backend/controllers/taskController.js
===================================================================
--- backend/controllers/taskController.js	(revision a900ddb5758880fc32d5c2401cad850e6f4d88ac)
+++ backend/controllers/taskController.js	(revision fae62778184fe587f3cb4d196752e6171a9525a6)
@@ -102,28 +102,9 @@
 const getTaskByDate = async (req, res) => {
   try {
-    const now = new Date();
-
-    const year = now.getUTCFullYear();
-    const month = now.getUTCMonth();
-    const day = now.getUTCDate();
-
-    let effectiveDay = day;
-    if (now.getUTCHours() < 7) {
-      effectiveDay = day - 1;
-    }
-
-    const startOfEffectiveDay = new Date(
-      Date.UTC(year, month, effectiveDay, 0, 0, 0, 0)
-    );
-
-    const startOfNextDay = new Date(startOfEffectiveDay);
-    startOfNextDay.setUTCDate(startOfEffectiveDay.getUTCDate() + 1);
-
+    const { date } = req.query;
+    const searchDate = new Date(date).toISOString();
     let tasks = await prisma.challenges.findMany({
       where: {
-        solving_date: {
-          gte: startOfEffectiveDay,
-          lt: startOfNextDay,
-        },
+        solving_date: searchDate,
         expired: false,
       },
@@ -132,4 +113,5 @@
       },
     });
+
     if (tasks.length === 0) {
       return res.status(404).json({ message: 'No tasks found for this date' });
Index: backend/scripts/scriptForTesting.js
===================================================================
--- backend/scripts/scriptForTesting.js	(revision a900ddb5758880fc32d5c2401cad850e6f4d88ac)
+++ backend/scripts/scriptForTesting.js	(revision fae62778184fe587f3cb4d196752e6171a9525a6)
@@ -2,60 +2,57 @@
 const prisma = require('../lib/prisma');
 const { sendModeratorEmail } = require('../services/emailService');
-// async function getTodaysChallenges() {
-//   try {
-//     const now = new Date();
+async function getTodaysChallenges() {
+  try {
+    const now = new Date();
 
-//     const year = now.getUTCFullYear();
-//     const month = now.getUTCMonth();
-//     const day = now.getUTCDate();
+    const year = now.getUTCFullYear();
+    const month = now.getUTCMonth();
+    const day = now.getUTCDate();
 
-//     let effectiveDay = day;
-//     if (now.getUTCHours() < 7) {
-//       effectiveDay = day - 1;
-//     }
+    let effectiveDay = day;
+    if (now.getUTCHours() < 7) {
+      effectiveDay = day - 1;
+    }
+    console.log(effectiveDay);
+    const startOfEffectiveDay = new Date(
+      Date.UTC(year, month, effectiveDay, 0, 0, 0, 0)
+    );
 
-//     const startOfEffectiveDay = new Date(
-//       Date.UTC(year, month, effectiveDay, 0, 0, 0, 0)
-//     );
+    const startOfNextDay = new Date(startOfEffectiveDay);
+    startOfNextDay.setUTCDate(startOfEffectiveDay.getUTCDate() + 1);
 
-//     const startOfNextDay = new Date(startOfEffectiveDay);
-//     startOfNextDay.setUTCDate(startOfEffectiveDay.getUTCDate() + 1);
+    console.log(
+      'Querying between (UTC dates):',
+      startOfEffectiveDay.toISOString(),
+      'and',
+      startOfNextDay.toISOString()
+    );
 
-//     console.log(
-//       'Querying between (UTC dates):',
-//       startOfEffectiveDay.toISOString(),
-//       'and',
-//       startOfNextDay.toISOString()
-//     );
+    let challenges = await prisma.challenges.findMany({
+      where: {
+        solving_date: startOfEffectiveDay,
+        expired: false,
+      },
+      include: {
+        test_cases: true,
+      },
+    });
 
-//     let challenges = await prisma.challenges.findMany({
-//       where: {
-//         solving_date: {
-//           gte: startOfEffectiveDay,
-//           lt: startOfNextDay,
-//         },
-//         expired: false,
-//       },
-//       include: {
-//         test_cases: true,
-//       },
-//     });
+    if (challenges.length > 0) {
+      console.log(`Found ${challenges.length} challenge(s) for today:`);
+      console.log(challenges);
+    } else {
+      console.log('No challenges found for today.');
+    }
+  } catch (error) {
+    console.error("Error fetching today's challenges:", error);
+    process.exitCode = 1;
+  } finally {
+    await prisma.$disconnect();
+    console.log('Disconnected from database.');
+  }
+}
 
-//     if (challenges.length > 0) {
-//       console.log(`Found ${challenges.length} challenge(s) for today:`);
-//       console.log(challenges);
-//     } else {
-//       console.log('No challenges found for today.');
-//     }
-//   } catch (error) {
-//     console.error("Error fetching today's challenges:", error);
-//     process.exitCode = 1;
-//   } finally {
-//     await prisma.$disconnect();
-//     console.log('Disconnected from database.');
-//   }
-// }
-
-// getTodaysChallenges();
+getTodaysChallenges();
 
 // async function resetUsers() {
Index: client/src/Dashboard/components/ManagePosts.jsx
===================================================================
--- client/src/Dashboard/components/ManagePosts.jsx	(revision a900ddb5758880fc32d5c2401cad850e6f4d88ac)
+++ client/src/Dashboard/components/ManagePosts.jsx	(revision fae62778184fe587f3cb4d196752e6171a9525a6)
@@ -421,5 +421,5 @@
                       <div className="flex gap-1.5">
                         {(filters.topic !== 'all' ||
-                          filters.dateSort !== 'newest' ||
+                          filters.dateSort !== 'oldest' ||
                           filters.selectedDate ||
                           (filters.searchText &&
Index: client/src/services/taskService.js
===================================================================
--- client/src/services/taskService.js	(revision a900ddb5758880fc32d5c2401cad850e6f4d88ac)
+++ client/src/services/taskService.js	(revision fae62778184fe587f3cb4d196752e6171a9525a6)
@@ -2,5 +2,6 @@
 
 export const getTaskForDate = async () => {
-  return await apiClient.get(`/task/today`);
+  const today = new Date().toISOString().split('T')[0];
+  return await apiClient.get(`/task/today?date=${today}`);
 };
 export const getTasksForForumPost = async () => {
