/**
* @file include/ping.php
*/
+
use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Content\ForumManager;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
-use Friendica\Core\System;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
+use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Group;
+use Friendica\Util\Temporal;
use Friendica\Util\XML;
require_once 'include/datetime.php';
WHERE `event`.`uid` = %d AND `start` < '%s' AND `finish` > '%s' and `ignore` = 0
ORDER BY `start` ASC ",
intval(local_user()),
- dbesc(datetime_convert('UTC', 'UTC', 'now + 7 days')),
- dbesc(datetime_convert('UTC', 'UTC', 'now'))
+ dbesc(Temporal::utc('now + 7 days')),
+ dbesc(Temporal::utcNow())
);
if (DBM::is_result($ev)) {
Cache::set($cachekey, $ev, CACHE_HOUR);
$all_events = count($ev);
if ($all_events) {
- $str_now = datetime_convert('UTC', $a->timezone, 'now', 'Y-m-d');
+ $str_now = Temporal::timezoneNow($a->timezone, 'Y-m-d');
foreach ($ev as $x) {
$bd = false;
if ($x['type'] === 'birthday') {
} else {
$events ++;
}
- if (datetime_convert('UTC', ((intval($x['adjust'])) ? $a->timezone : 'UTC'), $x['start'], 'Y-m-d') === $str_now) {
+ if (Temporal::convert($x['start'], ((intval($x['adjust'])) ? $a->timezone : 'UTC'), 'UTC', 'Y-m-d') === $str_now) {
$all_events_today ++;
if ($bd) {
$birthdays_today ++;
'photo' => $intro['photo'],
'date' => $intro['datetime'],
'seen' => false,
- 'message' => t('{0} wants to be your friend'),
+ 'message' => L10n::t('{0} wants to be your friend'),
];
$notifs[] = $notif;
}
'photo' => $mail['from-photo'],
'date' => $mail['created'],
'seen' => false,
- 'message' => t('{0} sent you a message'),
+ 'message' => L10n::t('{0} sent you a message'),
];
$notifs[] = $notif;
}
'photo' => $reg['micro'],
'date' => $reg['created'],
'seen' => false,
- 'message' => t('{0} requested registration'),
+ 'message' => L10n::t('{0} requested registration'),
];
$notifs[] = $notif;
}
$notif['photo'] = proxy_url($notif['photo'], false, PROXY_SIZE_MICRO);
}
- $local_time = datetime_convert('UTC', date_default_timezone_get(), $notif['date']);
+ $local_time = Temporal::convert($notif['date'], date_default_timezone_get());
$notifications[] = [
'id' => $notif['id'],