X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FProfile.php;h=9987f86760090181156e359f3a058f1e563f3251;hb=f1d3f60499a325557be866fedd31b46093d477ae;hp=4e984baa6f9ab52f3bbc917706c120a3dbd0230c;hpb=be3fb5f2052dc3b11e85462f8d779caa14b176d6;p=friendica.git diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 4e984baa6f..9987f86760 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -41,7 +41,7 @@ use Friendica\Protocol\Diaspora; use Friendica\Util\DateTimeFormat; use Friendica\Util\HTTPSignature; use Friendica\Util\Network; -use Friendica\Util\Proxy as ProxyUtils; +use Friendica\Util\Proxy; use Friendica\Util\Strings; class Profile @@ -441,7 +441,7 @@ class Profile $p['address'] = BBCode::convertForUriId($profile['uri-id'] ?? 0, $p['address']); } - $p['photo'] = Contact::getAvatarUrlForId($cid, ProxyUtils::SIZE_SMALL); + $p['photo'] = Contact::getAvatarUrlForId($cid, Proxy::SIZE_SMALL); $p['url'] = Contact::magicLinkById($cid, $profile['url']); @@ -555,7 +555,7 @@ class Profile $rr['link'] = Contact::magicLinkById($rr['cid']); $rr['title'] = $rr['name']; - $rr['date'] = DI::l10n()->getDay(DateTimeFormat::convert($rr['start'], $a->getTimeZone(), 'UTC', $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ? ' ' . DI::l10n()->t('[today]') : ''); + $rr['date'] = DI::l10n()->getDay(DateTimeFormat::local($rr['start'], $bd_short)) . (($today) ? ' ' . DI::l10n()->t('[today]') : ''); $rr['startime'] = null; $rr['today'] = $today; } @@ -614,8 +614,8 @@ class Profile $total++; } - $strt = DateTimeFormat::convert($rr['start'], $rr['adjust'] ? $a->getTimeZone() : 'UTC', 'UTC', 'Y-m-d'); - if ($strt === DateTimeFormat::timezoneNow($a->getTimeZone(), 'Y-m-d')) { + $strt = DateTimeFormat::local($rr['start'], 'Y-m-d'); + if ($strt === DateTimeFormat::localNow('Y-m-d')) { $istoday = true; } @@ -630,17 +630,17 @@ class Profile $description = DI::l10n()->t('[No description]'); } - $strt = DateTimeFormat::convert($rr['start'], $rr['adjust'] ? $a->getTimeZone() : 'UTC'); + $strt = DateTimeFormat::local($rr['start']); - if (substr($strt, 0, 10) < DateTimeFormat::timezoneNow($a->getTimeZone(), 'Y-m-d')) { + if (substr($strt, 0, 10) < DateTimeFormat::localNow('Y-m-d')) { continue; } - $today = ((substr($strt, 0, 10) === DateTimeFormat::timezoneNow($a->getTimeZone(), 'Y-m-d')) ? true : false); + $today = substr($strt, 0, 10) === DateTimeFormat::localNow('Y-m-d'); $rr['title'] = $title; $rr['description'] = $description; - $rr['date'] = DI::l10n()->getDay(DateTimeFormat::convert($rr['start'], $rr['adjust'] ? $a->getTimeZone() : 'UTC', 'UTC', $bd_format)) . (($today) ? ' ' . DI::l10n()->t('[today]') : ''); + $rr['date'] = DI::l10n()->getDay(DateTimeFormat::local($rr['start'], $bd_format)) . (($today) ? ' ' . DI::l10n()->t('[today]') : ''); $rr['startime'] = $strt; $rr['today'] = $today;