Quote:
Originally Posted by akiy
Since I didn't see any code to insert the time when each message was sent, I went ahead and coded it myself.
After:
Code:
if($thisIgnore == 0){
I inserted:
Code:
$time = date("g:ia",
mktime(date("H",
$ThisMSG['s_postime'])-$timediff+$ThisMSG['timezoneoffset'],
date("i, s, m, d, Y", $ThisMSG['s_postime'])));
I can now use $time in the chat_row and chat_row_special_recieved (sic) templates. $time takes into consideration the current chatter's timezoneoffset setting and the server's timezone setting so that each person should see their own local time when the messages were posted.
|
Oops -- bug. It looks like the code I used above didn't do the timezone offset very well.
Instead of the code that I inserted above, try using:
Code:
$time = date("g:ia",
mktime(date("H",
$ThisMSG['s_postime'])-$vboptions['timeoffset']+$bbuserinfo['timezoneoffset'],
date("i, s, m, d, Y", $ThisMSG['s_postime'])));
This should then have $time set to the user's local timezone (provided they set it in their own profile options, of course).