From 61ab60288706b8ad784b2cd8c4cd010c2cd7d7b4 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Wed, 13 May 2026 21:32:13 +0200 Subject: [PATCH] fix(iplog): parse xray access-log timestamps in local time Xray writes access-log timestamps in the server's local timezone, but time.Parse interpreted them as UTC, shifting the stored unix epoch by the host offset. The panel rendered the epoch back to local time, so CST users saw IP-log times 8 hours in the future. Parse the log timestamp with time.ParseInLocation(time.Local) so it round-trips. Fixes #4147 --- web/job/check_client_ip_job.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/job/check_client_ip_job.go b/web/job/check_client_ip_job.go index 3f1064ff..644a717b 100644 --- a/web/job/check_client_ip_job.go +++ b/web/job/check_client_ip_job.go @@ -181,7 +181,7 @@ func (j *CheckClientIpJob) processLogFile() bool { var timestamp int64 timestampMatches := timestampRegex.FindStringSubmatch(line) if len(timestampMatches) >= 2 { - t, err := time.Parse("2006/01/02 15:04:05", timestampMatches[1]) + t, err := time.ParseInLocation("2006/01/02 15:04:05", timestampMatches[1], time.Local) if err == nil { timestamp = t.Unix() } else {