public static function PhpMailerSmtp::rfcDate in PHPMailer SMTP 8
Same name and namespace in other branches
- 2.x src/Plugin/Mail/PhpMailerSmtp.php \Drupal\phpmailer_smtp\Plugin\Mail\PhpMailerSmtp::rfcDate()
- 2.0.x src/Plugin/Mail/PhpMailerSmtp.php \Drupal\phpmailer_smtp\Plugin\Mail\PhpMailerSmtp::rfcDate()
- 2.1.x src/Plugin/Mail/PhpMailerSmtp.php \Drupal\phpmailer_smtp\Plugin\Mail\PhpMailerSmtp::rfcDate()
Wrap PHPMailer::RFCDate() to return the current timezone.
File
- src/
Plugin/ Mail/ PhpMailerSmtp.php, line 300
Class
- PhpMailerSmtp
- Implements the base PHPMailer SMTP class for the Drupal MailInterface.
Namespace
Drupal\phpmailer_smtp\Plugin\MailCode
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;
}