Explorar o código

Explicitly use UTC when logging tunnel start time

Rod Hynes %!s(int64=9) %!d(string=hai) anos
pai
achega
45e2d36ac6
Modificáronse 2 ficheiros con 2 adicións e 3 borrados
  1. 2 2
      psiphon/common/net.go
  2. 0 1
      psiphon/server/tunnelServer.go

+ 2 - 2
psiphon/common/net.go

@@ -225,9 +225,9 @@ func NewActivityMonitoredConn(
 }
 
 // GetStartTime gets the time when the ActivityMonitoredConn was
-// initialized.
+// initialized. Reported time is UTC.
 func (conn *ActivityMonitoredConn) GetStartTime() time.Time {
-	return conn.realStartTime
+	return conn.realStartTime.UTC()
 }
 
 // GetActiveDuration returns the time elapsed between the initialization

+ 0 - 1
psiphon/server/tunnelServer.go

@@ -771,7 +771,6 @@ func (sshClient *sshClient) stop() {
 		sshClient.handshakeState.apiParams,
 		baseRequestParams)
 
-	// TODO: match legacy log field naming convention?
 	logFields["handshake_completed"] = sshClient.handshakeState.completed
 	logFields["start_time"] = sshClient.activityConn.GetStartTime()
 	logFields["duration"] = sshClient.activityConn.GetActiveDuration()