You are here

public static function DrupalPHPMailer::RFCDate in PHPMailer 7.4

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 includes/phpmailer.inc \DrupalPHPMailer::RFCDate()
  4. 6.2 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()
  5. 7.3 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()

Public wrapper around PHPMailer::RFCDate().

File

includes/phpmailer.class.inc, line 220
Implements the base PHPMailer for Drupal class.

Class

DrupalPHPMailer
Class for implementing the PHPMailer library in Drupal.

Code

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