mirror of
https://github.com/hotyue/IP-Sentinel.git
synced 2026-09-04 23:18:17 +08:00
fix(core): 强制所有业务模块日志与独立战报使用绝对 UTC 时间,彻底根除跨时区排障时的时间线错乱
This commit is contained in:
+2
-1
@@ -45,7 +45,8 @@ fi
|
||||
log_msg() {
|
||||
local TYPE=$1
|
||||
local MSG=$2
|
||||
local TIME=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
# [时区对齐] 强制无视本地时区,以绝对 UTC 时间生成日志时间戳
|
||||
local TIME=$(date -u "+%Y-%m-%d %H:%M:%S UTC")
|
||||
# [v3.4.0 核心] 提取当前配置中的版本锚点
|
||||
local local_ver="${AGENT_VERSION:-未知}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user