aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-23 04:11:59 -0700
committerfriendica <info@friendica.com>2012-07-23 04:11:59 -0700
commit3decf67e6d6aa0ae077aa48bcdd37afc05a36dd1 (patch)
tree890749f2ac3bca28745ff93089c4c9e68e49ae63 /include
parent33ea8737b71466be84dfaaa0fa16cd2850805158 (diff)
downloadvolse-hubzilla-3decf67e6d6aa0ae077aa48bcdd37afc05a36dd1.tar.gz
volse-hubzilla-3decf67e6d6aa0ae077aa48bcdd37afc05a36dd1.tar.bz2
volse-hubzilla-3decf67e6d6aa0ae077aa48bcdd37afc05a36dd1.zip
realtime updates of "6 minutes ago" with fallback to iso8601 timestamps (available on tooltip)
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 06b643a05..958400db3 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -457,7 +457,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$body = prepare_body($item,true);
-
+
//$tmp_item = replace_macros($tpl,array(
$tmp_item = array(
'template' => $tpl,
@@ -473,7 +473,10 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
'title' => template_escape($item['title']),
'body' => template_escape($body),
'text' => strip_tags(template_escape($body)),
- 'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
+ 'ago' => relative_date($item['created']),
+ 'app' => $item['app'],
+ 'str_app' => sprintf( t(' from %s'), $item['app']),
+ 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'),
'location' => template_escape($location),
'indent' => '',
'owner_name' => template_escape($owner_name),
@@ -832,7 +835,10 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
'osparkle' => $osparkle,
'sparkle' => $sparkle,
'title' => template_escape($item['title']),
- 'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
+ 'ago' => datetime_convert('UTC',date_default_timezone_get(),$item['created'],'r'), // relative_date($item['created']),
+ 'app' => $item['app'],
+ 'str_app' => sprintf( t(' from %s'), $item['app']),
+ 'localtime' => datetime_convert('UTC', 'UTC', $item['created'], 'c'),
'lock' => $lock,
'location' => template_escape($location),
'indent' => $indent,