From 6220da0106993ac6b8b9f2ef3a3e00a0ac6ab6ee Mon Sep 17 00:00:00 2001 From: Mike Bonnet Date: Sun, 8 Feb 2009 14:35:10 -0500 Subject: [PATCH] simplify estimated completion calculation --- www/kojiweb/index.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/www/kojiweb/index.py b/www/kojiweb/index.py index dad1c9b6..adc5a66f 100644 --- a/www/kojiweb/index.py +++ b/www/kojiweb/index.py @@ -1043,9 +1043,7 @@ def buildinfo(req, buildID): avgDuration = server.getAverageBuildDuration(build['package_id']) if avgDuration != None: avgDelta = datetime.timedelta(seconds=avgDuration) - startTime = datetime.datetime.fromtimestamp( - time.mktime(time.strptime(koji.formatTime(build['creation_time']), '%Y-%m-%d %H:%M:%S')) - ) + startTime = datetime.datetime.fromtimestamp(build['creation_ts']) values['estCompletion'] = startTime + avgDelta else: values['estCompletion'] = None