소스 검색

Explicitly use UTC when logging tunnel start time

Rod Hynes 9 년 전
부모
커밋
45e2d36ac6
2개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  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()