Bug 23501 - If minutes >= 60, then displays 01:60:00, say
If minutes >= 60, then displays 01:60:00, say
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: up2date (Show other bugs)
7.0
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Preston Brown
Jay Turner
:
: 28157 28248 30191 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-07 00:32 EST by Nils Barth
Modified: 2015-01-07 18:42 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-14 08:00:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nils Barth 2001-01-07 00:32:16 EST
When downloading packages in up2date, time fields are displayed
incorrectly, e.g., in Time Remaining, namely the minute field, which should
be displayed mod 60, is displayed raw, e.g., if there are 90 minutes and 22
seconds remaining in a download, it displays 01:90:22, instead of 01:30:22
(or 90:22).

To reproduce, try downloading a large package (e.g., glibc) over a slow
connection (e.g., a modem).

Occurs in: up2date-2.1.7-1 on i386.
Comment 1 Geoff T 2001-02-05 02:14:17 EST
/usr/share/rhn/up2date/gui.py:361
                tstr = _("%d of %d kb transferred at %d k/sec\nPackage transfer
time: %02d:%02d:%02d (%02d:%02d:%02d remaining)") % (amount / 1024, total /
1024, bps / 1024, totalTime / (60*60), totalTime / 60, totalTime % 60, remaining
/ (60*60), remaining / 60, remaining % 60)

should read:
                tstr = _("%d of %d kb transferred at %d k/sec\nPackage transfer
time: %02d:%02d:%02d (%02d:%02d:%02d remaining)") % (amount / 1024, total /
1024, bps / 1024, totalTime / (60*60), (totalTime % 60*60) / 60, totalTime % 60,
remaining / (60*60), (remaining % 60*60) / 60, remaining % 60)
Comment 2 Geoff T 2001-02-05 18:24:10 EST
Sorry, I should know better than to edit code in a comment window when I should
already have gone home for the day *sighs*.  The change should read (in order to
avoid problems with evaluation order):

/usr/share/rhn/up2date/gui.py:361
                tstr = _("%d of %d kb transferred at %d k/sec\nPackage transfer
time: %02d:%02d:%02d (%02d:%02d:%02d remaining)") % (amount / 1024, total /1024,
bps / 1024, totalTime / (60*60), totalTime / 60, totalTime % 60, remaining /
(60*60), remaining / 60, remaining % 60)

should read:
                tstr = _("%d of %d kb transferred at %d k/sec\nPackage transfer
time: %02d:%02d:%02d (%02d:%02d:%02d remaining)") % (amount / 1024, total /
1024, bps / 1024, totalTime / (60*60), (totalTime % 3600) / 60, totalTime % 60,
remaining / (60*60), (remaining % 3600) / 60, remaining % 60)
Comment 3 Adrian Likins 2001-02-08 00:37:51 EST
Cool. Will make the change. Should be in the next up2date release.
Comment 4 Adrian Likins 2001-02-17 23:55:20 EST
*** Bug 28157 has been marked as a duplicate of this bug. ***
Comment 5 Cristian Gafton 2001-02-19 20:32:51 EST
Assigned QA to jturner
Comment 6 Preston Brown 2001-03-06 00:25:13 EST
fixed in CVS.
Comment 7 Preston Brown 2001-03-06 00:30:44 EST
*** Bug 28248 has been marked as a duplicate of this bug. ***
Comment 8 Preston Brown 2001-03-06 00:33:28 EST
*** Bug 30191 has been marked as a duplicate of this bug. ***
Comment 9 Jay Turner 2001-03-07 09:00:30 EST
I am still seeing this problem with the 3/7/01 CVS code over dial-up.
Comment 10 Jay Turner 2001-03-14 08:00:27 EST
OK, testing in the 3/14 tree shows that this problems appears to be solved.  We
are getting valid estimates for the time for transfer, so that's a good thing. 
I will test this evening with dial-up and make sure that we are displaying
minutes and hours correctly.
Comment 11 Preston Brown 2001-04-12 16:58:50 EDT
addressed in errata due out today.

Note You need to log in before you can comment on or make changes to this bug.