mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
- fix display of time in jobhistory when the job builds more than one day
This commit is contained in:
parent
7d46c5f879
commit
d21bbe48fd
@ -5301,11 +5301,14 @@ def print_jobhistory(apiurl, prj, current_package, repository, arch, format = 't
|
||||
st = int(node.get('starttime'))
|
||||
et = int(node.get('endtime'))
|
||||
endtime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(et))
|
||||
print "XXX", et, st
|
||||
waittm = time.gmtime(et-st)
|
||||
if waittm.tm_hour:
|
||||
waitbuild = "%2dh %2dm %2ds" % (waittm.tm_hour, waittm.tm_min, waittm.tm_sec)
|
||||
if waittm.tm_mday>1:
|
||||
waitbuild = "%1dd %2dh %2dm %2ds" % (waittm.tm_mday-1, waittm.tm_hour, waittm.tm_min, waittm.tm_sec)
|
||||
elif waittm.tm_hour:
|
||||
waitbuild = " %2dh %2dm %2ds" % (waittm.tm_hour, waittm.tm_min, waittm.tm_sec)
|
||||
else:
|
||||
waitbuild = " %2dm %2ds" % (waittm.tm_min, waittm.tm_sec)
|
||||
waitbuild = " %2dm %2ds" % (waittm.tm_min, waittm.tm_sec)
|
||||
|
||||
if format == 'csv':
|
||||
print '%s|%s|%s|%s|%s|%s' % (endtime, package, reason, code, waitbuild, worker)
|
||||
|
Loading…
Reference in New Issue
Block a user