summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/aix/uptime.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/plugins/aix/uptime.rb')
-rw-r--r--lib/ohai/plugins/aix/uptime.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ohai/plugins/aix/uptime.rb b/lib/ohai/plugins/aix/uptime.rb
index 6c33cb7b..270a692f 100644
--- a/lib/ohai/plugins/aix/uptime.rb
+++ b/lib/ohai/plugins/aix/uptime.rb
@@ -27,10 +27,10 @@ Ohai.plugin(:Uptime) do
so = shell_out('who -b')
so.stdout.lines.each do |line|
if line =~ /.* boot (.+)/
- uptime_seconds Time.now.to_i - DateTime.parse($1).strftime('%s').to_i
+ uptime_seconds Time.now.to_i - DateTime.parse($1 + " #{Time.now.zone}").strftime('%s').to_i
uptime seconds_to_human(uptime_seconds)
break
end
end
end
-end
+end \ No newline at end of file