MyBB Community Forums

Full Version: How do I print the time only, and not the date?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using a plugin that shows recent threads, but it displays the entire date. How do I make it display only the clock-time when it was posted?

I think it has something to do with this line (from the plugin):


$date   = my_date($mybb->settings['dateformat'].' '.$mybb->settings['timeformat'], $data['date']);
which plugin actually you are referring ? perhaps it would be better to to get the time from $data['date']
(2018-03-09, 01:29 PM).m. Wrote: [ -> ]which plugin actually you are referring ? perhaps it would be better to  to get the time from $data['date']

I am using https://community.mybb.com/mods.php?action=view&pid=543

And how would I do that?  Blush
(2018-03-09, 11:54 AM)amateurmodifier Wrote: [ -> ]I'm using a plugin that shows recent threads, but it displays the entire date. How do I make it display only the clock-time when it was posted?

I think it has something to do with this line (from the plugin):


$date   = my_date($mybb->settings['dateformat'].' '.$mybb->settings['timeformat'], $data['date']);

Try changing that line to:

$date   = my_date($mybb->settings['timeformat'], $data['date']);
:oops: I missed the simple code which is already visible to my eyes Sad