You are here

protected function StatusReportDetailsController::getTime in Acquia Content Hub 8.2

Time formatting.

Parameters

int $time: Timestamp of last update.

Return value

string Time as formatted.

Throws

\Exception;

1 call to StatusReportDetailsController::getTime()
StatusReportDetailsController::getWebhookDetails in modules/acquia_contenthub_publisher/src/Controller/StatusReportDetailsController.php
Returns the "Webhook Details" Section.

File

modules/acquia_contenthub_publisher/src/Controller/StatusReportDetailsController.php, line 198

Class

StatusReportDetailsController
Controller for status report details.

Namespace

Drupal\acquia_contenthub_publisher\Controller

Code

protected function getTime(int $time) {
  if ($time === 0) {
    return 'Not Found';
  }
  $formatted_time = \Drupal::service('date.formatter')
    ->format($time, 'long');
  return $formatted_time;
}