]> xenbits.xensource.com Git - osstest.git/commitdiff
show_abs_time: Represent undef $timet as <undef>
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 30 Oct 2017 11:36:16 +0000 (11:36 +0000)
committerIan Jackson <iwj@xenproject.org>
Fri, 2 Oct 2020 15:04:19 +0000 (16:04 +0100)
This can happen, for example, if a badly broken flight has steps which
are STARTING and have NULL in the start time column, and is then
reported using sg-report-flight.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Osstest.pm

index b2b6b74178c4c9d811b9589441599d7826f0c559..734c0ef6bf91d98685c514228ca8d034c5df29b8 100644 (file)
@@ -457,6 +457,7 @@ sub visible_undef ($) {
 
 sub show_abs_time ($) {
     my ($timet) = @_;
+    return '<undef>' unless defined $timet;
     return strftime "%Y-%m-%d %H:%M:%S Z", gmtime $timet;
 }