Privatemsg Module and custom timestamp By default the Privatemsg Module has three timestamp displays for various lengths the message has been sent. After a certain point the listed 'time' changes.

What I want to do is append the next timestamp to the end of the current one. This way it remains the details of minutes and date posted as time moves forward.

Example: after 24hrs, instead of it just saying 'Oct 8' I want it to say 'oct 8 12:45' and after a year '2014 oct 8 12:45'

I think I found the code in the module where timestamps are printing, I just can't figure out how to add to it.

function privatemsg_date_formats() {
  $formats = array('g:i a', 'H:i', 'M j', 'j M', 'm/d/y', 'd/m/y', 'j/n/y', 'n/j/y');
  $types = array_keys(privatemsg_date_format_types());
  $date_formats = array();
  foreach ($types as $type) {
    foreach ($formats as $format) {
      $date_formats[] = array(
        'type' =&gt; $type,
        'format' =&gt; $format,
        'locales' =&gt; array(),
      );
    }
  }
  return $date_formats;
}


function privatemsg_date_format_types() {
  return array(
    'privatemsg_current_day' =&gt; t('Privatemsg: Current day'),
    'privatemsg_current_year' =&gt; t('Privatemsg: Current year'),
    'privatemsg_years' =&gt; t('Privatemsg: Other years'),
  );
}


function privatemsg_format_date($timestamp) {
  if ($timestamp &gt; ((int)(REQUEST_TIME / 3600)) * 3600) {
    return t('@interval ago', array('@interval' =&gt; format_interval(abs(REQUEST_TIME - $timestamp), 1)));
  }
  if ($timestamp &gt; ((int)(REQUEST_TIME / 86400)) * 86400) {
    return format_date($timestamp, 'privatemsg_current_day');
  }
  if ($timestamp &gt; mktime(0, 0, 0, 1, 0, date('Y'))) {
    return format_date($timestamp, 'privatemsg_current_year');
  }
  return format_date($timestamp, 'privatemsg_years');
}
Add these two date formats (in admin/config/regional/date-time/formats):

M d H:i

Y M d H:i


After that choose above created date formats (in admin/config/regional/date-time)
in

Privatemsg: Current year &amp; Privatemsg: Other years  respectively.