diff --git a/bindings/java/src/net/hyperic/sigar/cmd/Who.java b/bindings/java/src/net/hyperic/sigar/cmd/Who.java index 4718c6ff..b05e17b5 100644 --- a/bindings/java/src/net/hyperic/sigar/cmd/Who.java +++ b/bindings/java/src/net/hyperic/sigar/cmd/Who.java @@ -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)); }