Merge pull request #268 from AkkiaS7/master

fix: 部分环境下启动时间锁定在1970年的问题
This commit is contained in:
naiba 2022-12-25 22:40:06 +08:00 committed by GitHub
commit aacae54eeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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