handle time == 0
This commit is contained in:
parent
db81786c26
commit
31f138dd0b
@ -20,6 +20,9 @@ public class Who extends SigarCommandBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getTime(long time) {
|
private String getTime(long time) {
|
||||||
|
if (time == 0) {
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
String fmt = "MMM dd HH:mm";
|
String fmt = "MMM dd HH:mm";
|
||||||
return new SimpleDateFormat(fmt).format(new Date(time));
|
return new SimpleDateFormat(fmt).format(new Date(time));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user