Red Hat Bugzilla – Bug 1253849
RFE: Time values table of builds are not humanized
Last modified: 2016-01-28 09:54:48 EST
Created attachment 1063174 [details]
non humanized values
Description of problem:
There are sometimes wired time values in the COPR Web UI, like that build was submitted "30 hours ago" instead of "1 day ago" or "69 minutes ago" instead of "1 hour ago"
Please see the attached screenshot.
The values should be ideally humanized.
For submissions that are not very recent I would prefer have date and time stamp actually - I don't particularly like information hiding here.
ie I might also want to see which of two builds finished first witout having to resort to sorting by build time.
The logic goes like this:
diff = now - datetime.datetime.fromtimestamp(time_in)
secdiff = int(diff.total_seconds())
if secdiff < 120:
# less than 2 minutes
return "1 minute"
elif secdiff < 7200:
# less than 2 hours
return str(secdiff // 60) + " minutes"
elif secdiff < 172800:
# less than 2 days
return str(secdiff // 3600) + " hours"
elif secdiff < 5184000:
# less than 2 months
return str(secdiff // 86400) + " days"
elif secdiff < 63072000:
# less than 2 years
return str(secdiff // 2592000) + " months"
# more than 2 years
return str(secdiff // 31536000) + " days
Personally I like the two days resolution. I think it is matter of personal preference.
Please, if you care about more detailed timestamp resolution, fill a separate bug with a description. To me the current state is nice and precise enough.
(In reply to clime from comment #4)
> Jens Petersen:
> Please, if you care about more detailed timestamp resolution, fill a
> separate bug with a description. To me the current state is nice and precise
I think this bug has a pretty self-explaining description. If the issue has been fixed - IOW there are no non-sense values like "69 minutes ago", then close it with proper comment. Saying that you like it as it is right now is hardly a technical decision.
(In reply to Tomas Hozza from comment #5)
> (In reply to clime from comment #4)
> > Jens Petersen:
Sorry, I missed that this was more a response to the comment #1. However closing this as WONTFIX does not makes sense to me.