function DrupalPHPMailer::RFCDate in PHPMailer 6
Same name and namespace in other branches
- 5.2 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()
- 6.3 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()
- 6.2 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()
- 7.4 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()
- 7.3 includes/phpmailer.class.inc \DrupalPHPMailer::RFCDate()
Returns the proper RFC 822 formatted date.
File
- includes/
phpmailer.inc, line 114
Class
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;
}