]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
Refactor datetime_convert into Temporal::convert
[friendica.git] / mod / contacts.php
index 12f6075dd6f26fa0b47a9bb6b98da2fafde31a0f..43e6ae826d2d50a52d93729fde6bc1c58b40db66 100644 (file)
@@ -2,6 +2,7 @@
 /**
  * @file mod/contacts.php
  */
+
 use Friendica\App;
 use Friendica\Content\ContactSelector;
 use Friendica\Content\Nav;
@@ -16,6 +17,7 @@ use Friendica\Model\GContact;
 use Friendica\Model\Group;
 use Friendica\Model\Profile;
 use Friendica\Network\Probe;
+use Friendica\Util\Temporal;
 
 require_once 'mod/proxy.php';
 
@@ -538,7 +540,7 @@ function contacts_content(App $a)
 
                $insecure = L10n::t('Private communications are not available for this contact.');
 
-               $last_update = (($contact['last-update'] <= NULL_DATE) ? L10n::t('Never') : datetime_convert('UTC', date_default_timezone_get(), $contact['last-update'], 'D, j M Y, g:i A'));
+               $last_update = (($contact['last-update'] <= NULL_DATE) ? L10n::t('Never') : Temporal::convert($contact['last-update'], date_default_timezone_get(), 'UTC', 'D, j M Y, g:i A'));
 
                if ($contact['last-update'] > NULL_DATE) {
                        $last_update .= ' ' . (($contact['last-update'] <= $contact['success_update']) ? L10n::t("\x28Update was successful\x29") : L10n::t("\x28Update was not successful\x29"));