handle time == 0

This commit is contained in:
Doug MacEachern 2005-07-24 05:01:08 +00:00
parent db81786c26
commit 31f138dd0b

View File

@ -20,6 +20,9 @@ public class Who extends SigarCommandBase {
}
private String getTime(long time) {
if (time == 0) {
return "unknown";
}
String fmt = "MMM dd HH:mm";
return new SimpleDateFormat(fmt).format(new Date(time));
}