Fix EMSI TRX time - force it to be local time
This commit is contained in:
parent
b41d65a8fd
commit
e3f2d6cf15
@ -32,6 +32,7 @@ class Node
|
|||||||
private Carbon $start_time; // The time our connection started
|
private Carbon $start_time; // The time our connection started
|
||||||
// @todo Change this to Carbon
|
// @todo Change this to Carbon
|
||||||
private string $node_time; // Current node's time
|
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; // The FTNs of the remote system
|
||||||
private Collection $ftns_authed; // The FTNs we have validated
|
private Collection $ftns_authed; // The FTNs we have validated
|
||||||
@ -48,6 +49,9 @@ class Node
|
|||||||
$this->ftns = collect();
|
$this->ftns = collect();
|
||||||
$this->ftns_authed = collect();
|
$this->ftns_authed = collect();
|
||||||
$this->ftns_other = 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 'flags':
|
||||||
case 'message':
|
case 'message':
|
||||||
case 'files':
|
case 'files':
|
||||||
|
case 'node_time':
|
||||||
|
case 'node_timezone':
|
||||||
case 'netmail':
|
case 'netmail':
|
||||||
// The current session speed
|
// The current session speed
|
||||||
case 'speed':
|
case 'speed':
|
||||||
@ -158,6 +164,7 @@ class Node
|
|||||||
case 'speed':
|
case 'speed':
|
||||||
case 'start_time':
|
case 'start_time':
|
||||||
case 'node_time':
|
case 'node_time':
|
||||||
|
case 'node_timezone':
|
||||||
|
|
||||||
case 'ver_major':
|
case 'ver_major':
|
||||||
case 'ver_minor':
|
case 'ver_minor':
|
||||||
|
@ -219,8 +219,8 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
|||||||
|
|
||||||
// EMD5 - MD5 unique string
|
// EMD5 - MD5 unique string
|
||||||
|
|
||||||
// Transaction Number
|
// Transaction Number (Time in local time)
|
||||||
$makedata .= sprintf('{TRX#}{[%lX]}',Carbon::now()->timestamp);
|
$makedata .= sprintf('{TRX#}{[%lX]}',Carbon::now()->timestamp+Carbon::now($this->node->node_timezone)->offset);
|
||||||
|
|
||||||
$makedata .= sprintf('{TZUTC}{[%+05d]}',-10*60);
|
$makedata .= sprintf('{TZUTC}{[%+05d]}',-10*60);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user