Message TimeStamp

Hello all!

In messages, you get the time_created as (number of hours/days ago).. Anyone knows if it is possible to change that to the actual time the message was created (ex. May 14 6:26am).

Thanks all!

  • @ Carlos, sorry I can't answer this one myself but I'd be intrigued if anybody can come back to you with the answer, as I'd love to see that feature in my site's messages too.

    Saying that, I think if at all possible (Not sure if it is) but site wide would be even better by a long shot, so in things like The Wire were included with your request above.

    Great question. :)


  • Well, if one is looking at e.g. the RiverDashBoard display.. The code which brings in the river with the "number of hours/ days/ etc" content is from this call --

            $river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '') . "</div>";

    -- therefore the ""number of hours/ days/ etc" content is already cosmetized by the function call to elgg_view_river_items() which is part of the Elgg engine. One can try and play around wth that area of the *core code (a *bad idea) or code a PlugIn which will trap the $river data and examine the " (2 hours ago)" etc text within and (re)convert to a " May 14 6:26am " type of time stamp. The coding for this cannot be too difficult at all ;-O

    The Wire uses a different call to obtain the wire posts only ( a subset of the river )  and so code in the Wire will need to be patched similarly by a different PlugIn ( to cover for Everyone.php, etc ).


  • Thanks Rob and Dhrup.

    I traced the the actual timestamp values stored in the database and found a bunch of numbers that do not seem to be date and time values. Obviously, these values mean something to the script that calculates and echos the 'time_created' data. I am thinking that in order for the system to make these calculations, i.e, number of hours and days, it has to somehow translate these values into actual date and time values.. I'll continue the search and see what we can do. I'll keep all posted.