Issue #4569 has been updated by Rein Henrichs.

Status changed from Available In Testing Branch to Ready for Checkin

Based on Paul's confirmation, I've merged William's second version into 
reductivelabs master (for immediate release as a 1.5.8rc2) and next (to ensure 
it makes its way into 1.6.0. Can be closed once we release rc2.
----------------------------------------
Bug #4569: Windows Uptime Fact is incorrect on Windows 
http://projects.puppetlabs.com/issues/4569

Author: William Van Hevelingen
Status: Ready for Checkin
Priority: High
Assigned to: 
Category: 
Target version: 1.5.8
Keywords: 
Branch: 


uptime on windows is incorrect. 

psinfo from pstools reports uptime as 0 days, 5 hours, 22 minutes, 11 seconds

facter reports:

uptime => 14839 days
uptime_hours => 356136
uptime_seconds => 1282092950

The problem appears to be that getTickCount.call() is being treated as an epoch 
time value, which it is not. The return is the number of clock cycles since the 
machine started; not the time the machine started. This being the case, it is 
folly to try and perform epoch time operations using it. 

On a side note, it doesn't seem quite right to hard-code 1000 as the clock tick 
and trust that for an accurate measurement for how long the system has been up. 
That said, doing so will at least get you a marginally sane result on most 
modern systems.




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to