mirror of
https://github.com/netbirdio/netbird.git
synced 2025-04-10 18:58:27 +02:00
Use local time zone for display last update changes (#825)
* Use local time zone for display last update changes * using TZ UTC for testing purposes * use init func
This commit is contained in:
parent
6fec0c682e
commit
afaa3fbe4f
@ -249,7 +249,7 @@ func mapPeers(peers []*proto.PeerState) peersStateOutput {
|
|||||||
IP: pbPeerState.GetIP(),
|
IP: pbPeerState.GetIP(),
|
||||||
PubKey: pbPeerState.GetPubKey(),
|
PubKey: pbPeerState.GetPubKey(),
|
||||||
Status: pbPeerState.GetConnStatus(),
|
Status: pbPeerState.GetConnStatus(),
|
||||||
LastStatusUpdate: timeLocal.UTC(),
|
LastStatusUpdate: timeLocal,
|
||||||
ConnType: connType,
|
ConnType: connType,
|
||||||
Direct: pbPeerState.GetDirect(),
|
Direct: pbPeerState.GetDirect(),
|
||||||
IceCandidateType: iceCandidateType{
|
IceCandidateType: iceCandidateType{
|
||||||
|
@ -11,6 +11,15 @@ import (
|
|||||||
"github.com/netbirdio/netbird/version"
|
"github.com/netbirdio/netbird/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
loc, err := time.LoadLocation("UTC")
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
time.Local = loc
|
||||||
|
}
|
||||||
|
|
||||||
var resp = &proto.StatusResponse{
|
var resp = &proto.StatusResponse{
|
||||||
Status: "Connected",
|
Status: "Connected",
|
||||||
FullStatus: &proto.FullStatus{
|
FullStatus: &proto.FullStatus{
|
||||||
|
Loading…
Reference in New Issue
Block a user