logTime in mucConversationLog

Hello,

I’m trying to make a small php script using the mysql db to print the logs of the chatrooms. I would like to show the date when each message has been sent but I don’t know how to find it. For exemple 001202745533058 should be tuesday 11 february 2008, 17:02:52, but I don’t understand how it is encoded.

Thank you.

Benoît

Hi Benoît,

What you see in the database is a string representation of the java long date value (I call it a ticks value times 1000). Here is the sql I use in Postgresql to convert it to a datetime object.

‘epoch’ + int8(“logtime”) / 1000 * interval ‘1 second’

HTH,

daryl

Yes thanks it works perfectly.

We can use in php the date() function :

date(‘F j, Y - H I s T’,‘001202745533’); which prints : " February 11, 2008 - 15 0 53 UTC"

good information there http://www.epochconverter.com/ for others languages.

Benoît