Revert "Fix date being used in mail packets, timezone was effectively being to a timestamp with the timezone already"

This function is used to get the true date of a message (taking into account the TZ), and needed when creating the TZUTC

This reverts commit ad0ad73b0c.
This commit is contained in:
2024-06-28 18:28:12 +10:00
parent 7f4540f5ec
commit fc930ba6c2
11 changed files with 15 additions and 17 deletions

View File

@@ -59,11 +59,9 @@ trait MessageAttributes
return ($this->msg_src) ? $this->msg_src : $this->rebuildMessage();
}
/** @deprecated use datetime? */
public function getDateAttribute(): Carbon
{
Log::alert(sprintf('%s:! This function is deprecated',self::LOGKEY),['class'=>get_class($this)]);
return $this->datetime;
return $this->datetime->utcOffset($this->tzoffset);
}
public function getOriginAttribute(string $val=NULL): ?string

View File

@@ -19,7 +19,7 @@ trait MessagePath
$reply .= str_replace("\r---","\r#--",$mo->msg)."\r";
$reply .= "+------------------------------------[ CONTROL LINES ]-+\r";
$reply .= sprintf("DATE: %s\r",$mo->datetime->format('Y-m-d H:i:s'));
$reply .= sprintf("DATE: %s\r",$mo->date->format('Y-m-d H:i:s'));
if ($mo->msgid)
$reply .= sprintf("MSGID: %s\r",$mo->msgid);
if ($mo->replyid)