From 4efddddf5e0429a7f8fd2282ae92cc3f8c9111e1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 16 May 2014 11:22:45 +0200 Subject: checkpkgist: always display release date --- checkpkgist/checkpkgist.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'checkpkgist/checkpkgist.php') diff --git a/checkpkgist/checkpkgist.php b/checkpkgist/checkpkgist.php index 4d39f1b..5b772b1 100755 --- a/checkpkgist/checkpkgist.php +++ b/checkpkgist/checkpkgist.php @@ -76,8 +76,8 @@ foreach ($pkgs as $name => $rpm) { if (strpos($pkver, 'dev') !== false) { continue; } + $date = new DateTime($pkg['time']); if (version_compare($pkver, $rpmver, 'gt')) { - $date = new DateTime($pkg['time']); $diff = $date->diff(new DateTime("now")); if ($diff->days <2) { $note = "(Just released)"; @@ -97,7 +97,7 @@ foreach ($pkgs as $name => $rpm) { break; } else if (version_compare($pkver, $rpmver, 'eq') && $verb) { - printf(" %-40s %15s %15s\n", $rpm, $rpmver, $pkver); + printf(" %-40s %15s %15s %15s\n", $rpm, $rpmver, $pkver, $date->format("Y-m-d")); break; } } -- cgit