fix: 部分环境下启动时间锁定在1970年的问题

This commit is contained in:
Akkia 2022-12-25 21:26:34 +08:00
parent e878f32f6d
commit c670819391
No known key found for this signature in database
GPG Key ID: DABE9A4AB2DD7EF3

View File

@ -66,9 +66,7 @@ func GetHost(agentConfig *model.AgentConfig) *model.Host {
swapMemTotal = mv.SwapTotal
}
if cachedBootTime.IsZero() {
cachedBootTime = time.Unix(int64(hi.BootTime), 0)
}
cachedBootTime = time.Unix(int64(hi.BootTime), 0)
return &model.Host{
Platform: hi.Platform,