What miniBB version do you have?
My instruction to paste in bb_plugins.php is for the latest miniBB release. If you paste it in bb_specials.php, it will give a lot of errors and notices, which you may not see because error_reporting is E_NONE in your PHP setting or something like this. It will produce a lot of errors despite visibly it may appear working. So my only final instruction, again, is to paste it in bb_plugins.php. Else I won't even investigate why this or that with the code may not work ;-)
So, once again, it works if you paste the code in bb_plugins.php. I've tested it on my end many times.
Formatting the date is set up under setup_options.php -> $dateOnlyFormat, $timeOnlyFormat, $dateFormat options. Study Manual for more.