summaryrefslogtreecommitdiff
path: root/buildmaster/ssh-log.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-18 09:50:19 +0200
committerErich Eckner <git@eckner.net>2018-04-18 09:50:19 +0200
commit7607fb8bee300c9196df79188e8dea4dd1a315c1 (patch)
tree38aa0b2f3866a63fd64d5cb02328be40fa2360d8 /buildmaster/ssh-log.php
parent93e86de87f4bde6c9ab13651bb437533cc856633 (diff)
downloadarchweb32-7607fb8bee300c9196df79188e8dea4dd1a315c1.tar.xz
buildmaster/ssh-log.php: fix shown time interval
Diffstat (limited to 'buildmaster/ssh-log.php')
-rw-r--r--buildmaster/ssh-log.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/buildmaster/ssh-log.php b/buildmaster/ssh-log.php
index d293ebb..505cf22 100644
--- a/buildmaster/ssh-log.php
+++ b/buildmaster/ssh-log.php
@@ -2,6 +2,11 @@
include "lib/mysql.php";
+ if (isset($_GET["from"]))
+ $min_time = $_GET["from"];
+ else
+ $min_time = "00:42:00";
+
$result = mysql_run_query(
"SELECT `ssh_log`.`date`," .
"`build_slaves`.`name`," .
@@ -9,7 +14,10 @@
"`ssh_log`.`parameters`" .
" FROM `ssh_log`" .
" JOIN `build_slaves` ON `ssh_log`.`build_slave`=`build_slaves`.`id`" .
- " WHERE TIMEDIFF(NOW(),`ssh_log`.`date`) < \"10:00\"" .
+ " WHERE TIMEDIFF((" .
+ // NOW() is wrong here - due to differing time zones O.o
+ "SELECT MAX(`l`.`date`) FROM `ssh_log` AS `l`" .
+ "),`ssh_log`.`date`) < from_base64(\"" . base64_encode( $min_time ) . "\")" .
" ORDER BY `ssh_log`.`date` DESC"
);