Store datetime in UTC format now, and fix presentation of TZUTC. Also standardise message summaries on Notifications
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 42s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m51s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
2024-06-28 23:27:06 +10:00
parent fc930ba6c2
commit 4d7af7c7e3
17 changed files with 51 additions and 58 deletions

View File

@@ -233,7 +233,7 @@ class Message extends FTNBase
$o->mo->from = $o->header['user_from'];
$o->mo->subject = $o->header['subject'];
$o->mo->datetime = $o->datetime;
$o->mo->datetime = $o->datetime->clone()->utc();
$o->mo->tzoffset = $o->datetime->utcOffset();
$o->mo->flags = $o->header['flags'];
$o->mo->cost = $o->header['cost'];

View File

@@ -361,7 +361,7 @@ abstract class Packet extends FTNBase implements \Iterator, \Countable
$this->content .= "\00\00";
$this->messages = $msgs->map(fn($item)=>$item->only(['id','datetime']));
$this->messages = $msgs->map(fn($item)=>$item->only(['id','date']));
return $this;
}

View File

@@ -65,7 +65,7 @@ final class FSC39 extends Packet
*/
protected function header(Collection $msgs): string
{
$oldest = $this->messages->sortBy('datetime')->last();
$oldest = $this->messages->sortBy('date')->last();
return pack(collect(self::HEADER)->pluck(1)->join(''),
$this->fftn_p->node_id, // Orig Node

View File

@@ -65,7 +65,7 @@ final class FSC48 extends Packet
*/
protected function header(Collection $msgs): string
{
$oldest = $msgs->sortBy('datetime')->last();
$oldest = $msgs->sortBy('date')->last();
return pack(collect(self::HEADER)->pluck(1)->join(''),
$this->fftn_p->node_id, // Orig Node

View File

@@ -116,6 +116,6 @@ final class Mail extends Send
private function youngest(): Carbon
{
return $this->f->messages->pluck('datetime')->sort()->last();
return $this->f->messages->pluck('date')->sort()->last();
}
}