ShowConnections: Fix display for connection time older than one day
Session start time should be displayed as MMM-dd if it's more than one day ago but it's not. Check for session age is done incorrectly. Change-Id: I86c000b42661ee01f5893d571ea77490fc1fce13
This commit is contained in:
parent
7823dab9e7
commit
f12e75f769
@ -174,7 +174,7 @@ final class ShowConnections extends SshCommand {
|
||||
}
|
||||
|
||||
private static String time(final long now, final long time) {
|
||||
if (time - now < 24 * 60 * 60 * 1000L) {
|
||||
if (now - time < 24 * 60 * 60 * 1000L) {
|
||||
return new SimpleDateFormat("HH:mm:ss").format(new Date(time));
|
||||
}
|
||||
return new SimpleDateFormat("MMM-dd").format(new Date(time));
|
||||
|
Loading…
Reference in New Issue
Block a user