mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix Log RFC 2822 date parse error for #1554
This commit is contained in:
parent
73ac962289
commit
6cafd65690
1 changed files with 2 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ abstract class DateTimeHelper
|
||||||
{
|
{
|
||||||
$sDateTime = \trim($sDateTime);
|
$sDateTime = \trim($sDateTime);
|
||||||
if (empty($sDateTime)) {
|
if (empty($sDateTime)) {
|
||||||
\SnappyMail\Log::info("No RFC 2822 date to parse");
|
\SnappyMail\Log::info('', "No RFC 2822 date to parse");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ abstract class DateTimeHelper
|
||||||
$oDateTime = \DateTime::createFromFormat(\DateTime::RFC2822, $sDateTime, static::GetUtcTimeZoneObject());
|
$oDateTime = \DateTime::createFromFormat(\DateTime::RFC2822, $sDateTime, static::GetUtcTimeZoneObject());
|
||||||
// 398045302 is 1982-08-13 00:08:22 the date RFC 822 was created
|
// 398045302 is 1982-08-13 00:08:22 the date RFC 822 was created
|
||||||
if (!$oDateTime || 398045302 > $oDateTime->getTimestamp()) {
|
if (!$oDateTime || 398045302 > $oDateTime->getTimestamp()) {
|
||||||
\SnappyMail\Log::notice("Failed to parse RFC 2822 date '{$sDateTime}'");
|
\SnappyMail\Log::notice('', "Failed to parse RFC 2822 date '{$sDateTime}'");
|
||||||
}
|
}
|
||||||
return $oDateTime ? $oDateTime->getTimestamp() : 0;
|
return $oDateTime ? $oDateTime->getTimestamp() : 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue