diff --git a/bindings/java/src/net/hyperic/sigar/cmd/Who.java b/bindings/java/src/net/hyperic/sigar/cmd/Who.java index f7244e9b..5ee55136 100644 --- a/bindings/java/src/net/hyperic/sigar/cmd/Who.java +++ b/bindings/java/src/net/hyperic/sigar/cmd/Who.java @@ -1,6 +1,7 @@ package net.hyperic.sigar.cmd; import java.util.Date; +import java.text.SimpleDateFormat; import net.hyperic.sigar.Sigar; import net.hyperic.sigar.SigarException; @@ -19,12 +20,17 @@ public class Who extends SigarCommandBase { return "Show who is logged on"; } + private String getTime(long time) { + String fmt = "MMM dd HH:mm"; + return new SimpleDateFormat(fmt).format(new Date(time)); + } + public void output(String[] args) throws SigarException { net.hyperic.sigar.Who[] who = this.sigar.getWhoList(); for (int i=0; i