mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 06:57:03 +03:00
Fix intenaldate parser
This commit is contained in:
parent
1de1ecc9c4
commit
7dc9441852
12 changed files with 199 additions and 184 deletions
|
|
@ -55,7 +55,13 @@ class DateTimeHelper
|
|||
*/
|
||||
public static function ParseInternalDateString($sDateTime)
|
||||
{
|
||||
$oDateTime = \DateTime::createFromFormat('d-M-Y H:i:s O', \trim($sDateTime), \MailSo\Base\DateTimeHelper::GetUtcTimeZoneObject());
|
||||
$sDateTime = \trim($sDateTime);
|
||||
if (\preg_match('/^[a-z]{2,4}, /i', $sDateTime)) // RFC2822
|
||||
{
|
||||
return \MailSo\Base\DateTimeHelper::ParseRFC2822DateString($sDateTime);
|
||||
}
|
||||
|
||||
$oDateTime = \DateTime::createFromFormat('d-M-Y H:i:s O', $sDateTime, \MailSo\Base\DateTimeHelper::GetUtcTimeZoneObject());
|
||||
return $oDateTime ? $oDateTime->getTimestamp() : 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1800,7 +1800,7 @@ class Actions
|
|||
$oItem->SetReplyTo(isset($aItem['ReplyTo']) ? $aItem['ReplyTo'] : '');
|
||||
$oItem->SetBcc(isset($aItem['Bcc']) ? $aItem['Bcc'] : '');
|
||||
$oItem->SetSignature(isset($aItem['Signature']) ? $aItem['Signature'] : '');
|
||||
|
||||
|
||||
if ('' !== $oItem->Id())
|
||||
{
|
||||
\array_push($aIdentities, $oItem);
|
||||
|
|
@ -5829,7 +5829,7 @@ class Actions
|
|||
|
||||
return $this->DefaultResponse(__FUNCTION__, $mResult);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -5838,7 +5838,7 @@ class Actions
|
|||
$oAccount = $this->getAccountFromToken();
|
||||
|
||||
$mResult = false;
|
||||
|
||||
|
||||
$sUrl = $this->GetActionParam('Url', '');
|
||||
$sAccessToken = $this->GetActionParam('AccessToken', '');
|
||||
$sGoogleApiKey = (string) $this->Config()->Get('social', 'google_api_key', '');
|
||||
|
|
|
|||
|
|
@ -179,7 +179,9 @@
|
|||
<span class="i18n uiLabel labelTo" data-i18n-text="MESSAGE/LABEL_TO"></span>:
|
||||
<span class="to" data-bind="html: viewToShort, title: viewTo"></span>
|
||||
</span>
|
||||
(<span class="date" data-bind="text: viewDate"></span>)
|
||||
<span data-bind="visible: '' !== viewDate()">
|
||||
(<span class="date" data-bind="text: viewDate"></span>)
|
||||
</span>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
|
@ -205,7 +207,7 @@
|
|||
|
||||
<span class="bcc" data-bind="text: viewBcc, title: viewBcc"></span>
|
||||
</div>
|
||||
<div>
|
||||
<div data-bind="visible: '' !== viewDate()">
|
||||
<span class="i18n uiLabel labelBcc" data-i18n-text="MESSAGE/LABEL_DATE"></span>:
|
||||
|
||||
<span class="date" data-bind="text: viewDate"></span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue