In Ruby you can get it using `#to_i` method on [`Time`](http://apidock.com/ruby/Time/to_i) object.
If you're using `active_support` gem (default for Ruby on Rails application) `#to_i` is also available on `DateTime` and `ActiveSupport::TimeWithZone` objects.