Method: ActiveSupport::TimeWithZone#to_a

Defined in:
lib/active_support/time_with_zone.rb

#to_aObject

Returns Array of parts of Time in sequence of [seconds, minutes, hours, day, month, year, weekday, yearday, dst?, zone].

now = Time.zone.now     # => Tue, 18 Aug 2015 02:29:27.485278555 UTC +00:00
now.to_a                # => [27, 29, 2, 18, 8, 2015, 2, 230, false, "UTC"]


455
456
457
# File 'lib/active_support/time_with_zone.rb', line 455

def to_a
  [time.sec, time.min, time.hour, time.day, time.mon, time.year, time.wday, time.yday, dst?, zone]
end