diff --git a/lib/WebGUI/Operation/Statistics.pm b/lib/WebGUI/Operation/Statistics.pm
index 3f24f6c83..d95283773 100644
--- a/lib/WebGUI/Operation/Statistics.pm
+++ b/lib/WebGUI/Operation/Statistics.pm
@@ -59,8 +59,8 @@ sub www_viewActiveSessions {
while (%data = $sth->hash) {
$row[$i] = '
| '.$data{username}.' ('.$data{userId}.') | ';
$row[$i] .= ''.$data{sessionId}.' | ';
- $row[$i] .= ''.epochToHuman($data{expires},"%H:%n%p %M/%D/%y").' | ';
- $row[$i] .= ''.epochToHuman($data{lastPageView},"%H:%n%p %M/%D/%y").' | ';
+ $row[$i] .= ''.epochToHuman($data{expires}).' | ';
+ $row[$i] .= ''.epochToHuman($data{lastPageView}).' | ';
$row[$i] .= ''.$data{lastIP}.' | ';
$row[$i] .= ''.deleteIcon("op=killSession&sid=$data{sessionId}").' |
';
$i++;
diff --git a/sbin/Hourly/DeleteExpiredSessions.pm b/sbin/Hourly/DeleteExpiredSessions.pm
index c2d5735fb..646c2a5e1 100644
--- a/sbin/Hourly/DeleteExpiredSessions.pm
+++ b/sbin/Hourly/DeleteExpiredSessions.pm
@@ -20,10 +20,9 @@ sub process {
my $epoch = time();
my $sth = WebGUI::SQL->read("select sessionId from userSession where expires<".$epoch);
while (my ($sessionId) = $sth->array) {
- WebGUI::SQL->write("delete from userSessionScratch where sessionId=".quote($sessionId));
+ WebGUI::Session::end($sessionId);
}
$sth->finish;
- WebGUI::SQL->write("delete from userSession where expires<".$epoch);
}
1;
diff --git a/sbin/runHourly.pl b/sbin/runHourly.pl
index 55632b393..ef40a7f31 100644
--- a/sbin/runHourly.pl
+++ b/sbin/runHourly.pl
@@ -58,6 +58,7 @@ if (opendir (CONFDIR,$confdir)) {
&$cmd();
}
}
+ WebGUI::Session::end($session{var}{sessionId});
WebGUI::Session::close();
}
}