api: expose v2 proxy timestamps as unix seconds (#5402)

This commit is contained in:
fatedier
2026-07-09 14:47:19 +08:00
committed by GitHub
parent becee40715
commit 84be1938e4
9 changed files with 43 additions and 8 deletions

View File

@@ -239,9 +239,11 @@ func toProxyStats(name string, proxyStats *ProxyStatistics) *ProxyStats {
}
if !proxyStats.LastStartTime.IsZero() {
ps.LastStartTime = proxyStats.LastStartTime.Format("01-02 15:04:05")
ps.LastStartAt = proxyStats.LastStartTime.Unix()
}
if !proxyStats.LastCloseTime.IsZero() {
ps.LastCloseTime = proxyStats.LastCloseTime.Format("01-02 15:04:05")
ps.LastCloseAt = proxyStats.LastCloseTime.Unix()
}
return ps
}