Bug 15307 - Uptime is wrong
: Uptime is wrong
Status: RESOLVED FIXED
Product: SB Radio
Classification: Unclassified
Component: Diagnostics/Tests
: Include FW version in comment
: PC Windows XP
: P3 normal (vote)
: 8.0.0
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-15 09:06 UTC by Ryan
Modified: 2010-03-01 08:03 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan 2009-12-15 09:06:17 UTC
This is probably just the wrong units specifyed 

I noticed the Uptime displayed 1 days 55 hours 33 minutes Shouldn't that be 

3 days 7 hours 33 minutes.
Comment 1 aslak3 2010-02-28 19:02:02 UTC
I noticed this as well, on the 7.4.2 firmware.  I have time I will try to make a patch.
Comment 2 aslak3 2010-03-01 00:03:16 UTC
Here's a patch to fix this:

--- Diagnostics/DiagnosticsApplet.lua.bak	Mon Mar  1 03:12:52 2010
+++ Diagnostics/DiagnosticsApplet.lua	Mon Mar  1 03:14:06 2010
@@ -287,8 +287,8 @@
 		time = string.match(time, "(%d+)")
 	
 		uptime = {}
-		uptime.days = math.floor(time / 216000)
-		time = math.fmod(time, 216000)
+		uptime.days = math.floor(time / 86400)
+		time = math.fmod(time, 86400)
 		uptime.hours = math.floor(time / 3600)
 		time = math.fmod(time, 3600)
 		uptime.minutes = math.floor(time / 60)

I have no idea why the number of seconds in a day is 2.5 times too large, but anyway the above patch works for me.
Comment 3 SVN Bot 2010-03-01 08:03:19 UTC
 == Auto-comment from SVN commit #8605 to the jive repo by bklaas ==
 == https://svn.slimdevices.com/jive?view=revision&revision=8605 ==

Fixed Bug: 15307
Description: there are 86400 seconds in a day
Ryan/aslak3: thanks for pointing this bug out :)