weizhouapache commented on code in PR #11670: URL: https://github.com/apache/cloudstack/pull/11670#discussion_r2358313402
########## server/src/main/java/com/cloud/server/StatsCollector.java: ########## @@ -937,12 +937,12 @@ private void getProcFileSystemData(@NotNull ManagementServerHostStatsEntry newEn logger.info(String.format("used memory from /proc: %d", newEntry.getSystemMemoryUsed())); } try { - String bootTime = Script.runSimpleBashScript("uptime -s"); - SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.ENGLISH); + String bootTime = Script.runSimpleBashScript("date -d @$(grep btime /proc/stat | awk '{print $2}') '+%Y-%m-%d %H:%M:%S'"); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH); Review Comment: `yyyy-MM-dd HH:mm:ss` is correct I think. `yyyy-MM-dd hh:mm:ss` seems wrong, did it work in the past ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org