From: Gordon Thiesfeld Date: 2008-08-26T01:04:50+09:00 Subject: Re: [QUIZ] Uptime Since... (#174) On Sat, Aug 23, 2008 at 9:35 AM, Matthew Moss 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}"