You are here

public static function DrupalPHPMailer::RFCDate in PHPMailer 8.3

Public wrapper around PHPMailer::RFCDate().

File

src/Plugin/Mail/DrupalPHPMailer.php, line 228

Class

DrupalPHPMailer
Implements the base PHPMailer class for the Drupal MailInterface.

Namespace

Drupal\phpmailer\Plugin\Mail

Code

public static function RFCDate() {
  $tz = date('Z');
  $tzs = $tz < 0 ? '-' : '+';
  $tz = abs($tz);
  $tz = (int) ($tz / 3600) * 100 + $tz % 3600 / 60;
  $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz);
  return $result;
}