On Sat, Aug 23, 2008 at 9:35 AM, Matthew Moss <matthew.moss / gmail.com> wrote:
> ## Uptime Since... (#174)
>
# A windows solution.
require 'rubygems'
require 'ruby-wmi'
require 'date'
str = WMI::Win32_OperatingSystem.find(:first).LastBootupTime
boot = DateTime.strptime(str, "%Y%m%d%H%M")
boot_date = boot.strftime("%Y %b")
boot_time = boot.strftime("%I:%M")
puts "Last reboot: #{boot_date} at #{boot_time}"