diff --git a/mod/forum/search.php b/mod/forum/search.php
index 9913facfd7a74..9d4f21b8cf89e 100644
--- a/mod/forum/search.php
+++ b/mod/forum/search.php
@@ -369,11 +369,11 @@ function forum_print_big_search_form($course) {
}
echo ' ';
- $selectors = html_writer::select_time('days', 'fromday', $dateto)
- . html_writer::select_time('months', 'frommonth', $dateto)
- . html_writer::select_time('years', 'fromyear', $dateto)
- . html_writer::select_time('hours', 'fromhour', $dateto)
- . html_writer::select_time('minutes', 'fromminute', $dateto);
+ $selectors = html_writer::select_time('days', 'today', $dateto)
+ . html_writer::select_time('months', 'tomonth', $dateto)
+ . html_writer::select_time('years', 'toyear', $dateto)
+ . html_writer::select_time('hours', 'tohour', $dateto)
+ . html_writer::select_time('minutes', 'tominute', $dateto);
echo $selectors;
echo '';