1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-09 00:20:08 +00:00

Add formatted time for display in template

This commit is contained in:
Tim Düsterhus 2011-12-05 15:39:56 +01:00
parent 63cd1a31b3
commit 8f2fc01231
2 changed files with 3 additions and 2 deletions

View File

@ -94,9 +94,10 @@ public function jsonify() {
return \wcf\util\JSON::encode(array( return \wcf\util\JSON::encode(array(
'formattedUsername' => $this->getFormattedUsername(), 'formattedUsername' => $this->getFormattedUsername(),
'formattedMessage' => $this->getFormattedMessage(), 'formattedMessage' => $this->getFormattedMessage(),
'time' => $this->time, 'formattedTime' => \wcf\util\DateUtil::format(\wcf\util\DateUtil::getDateTimeByTimestamp($this->time), 'H:i:s'),
'sender' => $this->sender, 'sender' => $this->sender,
'username' => $this->getUsername(), 'username' => $this->getUsername(),
'time' => $this->time,
'receiver' => $this->receiver, 'receiver' => $this->receiver,
'type' => $this->type 'type' => $this->type
)); ));

View File

@ -1 +1 @@
{literal}{@$time} {@$formattedUsername}{@$formattedMessage}{/literal} {literal}{@$formattedTime} {@$formattedUsername}{@$formattedMessage}{/literal}