You are here

function DrupalPHPMailer::RFCDate in PHPMailer 6

Same name and namespace in other branches
  1. 5.2 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()
  2. 6.3 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()
  3. 6.2 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()
  4. 7.4 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()
  5. 7.3 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()

Returns the proper RFC 822 formatted date.

File

includes/phpmailer.inc, line 114

Class

DrupalPHPMailer

Code

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;
}