diff --git a/app/Classes/Node.php b/app/Classes/Node.php index 74a4af0..ce8a966 100644 --- a/app/Classes/Node.php +++ b/app/Classes/Node.php @@ -32,6 +32,7 @@ class Node private Carbon $start_time; // The time our connection started // @todo Change this to Carbon private string $node_time; // Current node's time + private string $node_timezone; // Current node's time zone private Collection $ftns; // The FTNs of the remote system private Collection $ftns_authed; // The FTNs we have validated @@ -48,6 +49,9 @@ class Node $this->ftns = collect(); $this->ftns_authed = collect(); $this->ftns_other = collect(); + + // @todo This should be configured in the DB for each FTN system + $this->node_timezone = 'Australia/Melbourne'; } /** @@ -97,6 +101,8 @@ class Node case 'flags': case 'message': case 'files': + case 'node_time': + case 'node_timezone': case 'netmail': // The current session speed case 'speed': @@ -158,6 +164,7 @@ class Node case 'speed': case 'start_time': case 'node_time': + case 'node_timezone': case 'ver_major': case 'ver_minor': diff --git a/app/Classes/Protocol/EMSI.php b/app/Classes/Protocol/EMSI.php index b3306ae..416bb22 100644 --- a/app/Classes/Protocol/EMSI.php +++ b/app/Classes/Protocol/EMSI.php @@ -219,8 +219,8 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface // EMD5 - MD5 unique string - // Transaction Number - $makedata .= sprintf('{TRX#}{[%lX]}',Carbon::now()->timestamp); + // Transaction Number (Time in local time) + $makedata .= sprintf('{TRX#}{[%lX]}',Carbon::now()->timestamp+Carbon::now($this->node->node_timezone)->offset); $makedata .= sprintf('{TZUTC}{[%+05d]}',-10*60);