drupal 8 custom timestamp formatter code example
Example: drupal 8 date formater service
\Drupal::service('date.formatter')
->format($timestamp, $type, $format, $timezone, $langcode);
\Drupal::service('date.formatter')
->format($timestamp, $type, $format, $timezone, $langcode);