[ticket/11896] Use $form_time and fix out of bounds $form_time

PHPBB3-11896