use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
+use Friendica\Util\DateTimeFormat;
use Friendica\Util\Temporal;
use dba;
if (strtotime($item['edited']) - strtotime($item['created']) > 1) {
$edited = [
'label' => L10n::t('This entry was edited'),
- 'date' => Temporal::convert($item['edited'], date_default_timezone_get(), 'UTC', 'r'),
- 'relative' => relative_date($item['edited'])
+ 'date' => DateTimeFormat::local($item['edited'], 'r'),
+ 'relative' => Temporal::getRelativeDate($item['edited'])
];
}
$commentww = '';
$comment = $this->getCommentBox($indent);
- if (strcmp(Temporal::utc($item['created']), Temporal::utc('now - 12 hours')) > 0) {
+ if (strcmp(DateTimeFormat::utc($item['created']), DateTimeFormat::utc('now - 12 hours')) > 0) {
$shiny = 'shiny';
}
'osparkle' => $osparkle,
'sparkle' => $sparkle,
'title' => $title_e,
- 'localtime' => Temporal::convert($item['created'], date_default_timezone_get(), 'UTC', 'r'),
- 'ago' => $item['app'] ? L10n::t('%s from %s', relative_date($item['created']), $item['app']) : relative_date($item['created']),
+ 'localtime' => DateTimeFormat::local($item['created'], 'r'),
+ 'ago' => $item['app'] ? L10n::t('%s from %s', Temporal::getRelativeDate($item['created']), $item['app']) : Temporal::getRelativeDate($item['created']),
'app' => $item['app'],
- 'created' => relative_date($item['created']),
+ 'created' => Temporal::getRelativeDate($item['created']),
'lock' => $lock,
'location' => $location_e,
'indent' => $indent,