unset($post['api_source']);
if (!empty($request['scheduled_at'])) {
- $scheduled_at = DateTimeFormat::convert($request['scheduled_at'], 'UTC', DI::app()->getTimeZone());
+ $scheduled_at = DateTimeFormat::convert($request['scheduled_at'], 'UTC', DI::apphelper()->getTimeZone());
if ($scheduled_at > DateTimeFormat::utcNow()) {
unset($post['created']);
unset($post['edited']);
$finish = DBA::NULL_DATETIME;
$nofinish = true;
} else {
- $finish = DateTimeFormat::convert($request['end_time'], 'UTC', DI::app()->getTimeZone());
+ $finish = DateTimeFormat::convert($request['end_time'], 'UTC', DI::apphelper()->getTimeZone());
$nofinish = false;
}
- $start = DateTimeFormat::convert($request['start_time'], 'UTC', DI::app()->getTimeZone());
+ $start = DateTimeFormat::convert($request['start_time'], 'UTC', DI::apphelper()->getTimeZone());
// create event
$event = [];
self::checkFormSecurityTokenRedirectOnError($redirectUrl, 'settings');
- $a = DI::app();
-
$user = User::getById($this->session->getLocalUserId());
if (!empty($request['password-submit'])) {
}
if (strlen($timezone) && $timezone != $user['timezone']) {
- $a->setTimeZone($timezone);
+ DI::apphelper()->setTimeZone($timezone);
}
$fields = [
return '';
}
- $a = DI::app();
-
$user = User::getById($this->session->getLocalUserId());
$username = $user['username'];
$expire_network_only = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'expire', 'network_only', false);
if (!strlen($user['timezone'])) {
- $timezone = $a->getTimeZone();
+ $timezone = DI::apphelper()->getTimeZone();
}
// Set the account type to "Community" when the page is a community page but the account type doesn't fit
Logger::info('Feed is too old', ['created' => $item['created'], 'uid' => $item['uid'], 'uri' => $item['uri']]);
continue;
}
-
+
if (!empty($item['plink'])) {
$fetch_further_information = $contact['fetch_further_information'] ?? LocalRelationship::FFI_NONE;
} else {
// Display events in the user's timezone
if (strlen($owner['timezone'])) {
- DI::app()->setTimeZone($owner['timezone']);
+ DI::apphelper()->setTimeZone($owner['timezone']);
}
$previous_created = $last_update;
$input_text,
DI::l10n()->t(
'Time zone: <strong>%s</strong> <a href="%s">Change in Settings</a>',
- str_replace('_', ' ', DI::app()->getTimeZone()) . ' (GMT ' . DateTimeFormat::localNow('P') . ')',
+ str_replace('_', ' ', DI::apphelper()->getTimeZone()) . ' (GMT ' . DateTimeFormat::localNow('P') . ')',
DI::baseUrl() . '/settings'
),
$required ? '*' : '',