class ActiveSupport::TimeWithZone

def to_i

Time.zone.now.to_i # => 1417709320

since the Epoch (January 1, 1970 00:00 UTC).
Returns the object's date and time as an integer number of seconds
def to_i
  utc.to_i
end