#!/usr/bin/ruby
puts "Content-type: text/html\n\n"
puts "<pre style='font-size:15px;color:blue;'>"
time = Time.new # or Time.now
puts "Current Time : " + time.inspect
puts time.year # Year
puts time.month # Month(1 to 12)
puts time.day # Day (1 to 31 )
puts time.wday # Day of week: 0 is Sunday
puts time.yday # Day of year (1 to 366)
puts time.hour # 24-hour clock
puts time.min # Minutes (0 to 59)
puts time.sec # Seconds (0 to 59)
puts time.usec # Microseconds
puts time.zone # Timezone name
millenium = Time.local(2000, 1, 1, 0, 0)
puts "Millenium Begins : " + millenium.inspect
puts time.utc_offset # Offset from GMT
puts time.isdst # false: If no DST.
puts time.gmtime # Convert back to GMT.
puts time.getlocal # New Time object in local zone
puts time.getutc # New Time object in GMT
puts time.strftime("%m/%d/%Y %H:%M:%S")
puts "</pre>"