Use Time.at:
t = Time.at(i)
Related Contents:
- Trouble comparing time with RSpec
- Ruby / Rails – Change the timezone of a Time, without changing the value
- Measure and Benchmark Time for Ruby Methods
- How to use Active Support core extensions
- How to add minutes to a Time object
- How to get a random number in Ruby
- Remove duplicate elements from array in Ruby
- Case statement with multiple values in each ‘when’ block
- How to replace a hash key with another key
- Paperclip::Errors::MissingRequiredValidatorError with Rails 4
- Rails formatting date
- Block comments in html.erb templates in rails
- When to use nil, blank, empty? [duplicate]
- Using helpers in model: how do I include helper dependencies?
- Rails: Custom text for rails form_for label
- ActiveRecord.find(array_of_ids), preserving order
- Tell the end of a .each loop in ruby
- How to get parent node in Capybara?
- rails – Redirecting console output to a file
- How do I find out which gem has a specific dependency?
- How do I replace accented Latin characters in Ruby?
- Rails Active Record find(:all, :order => ) issue
- Listen error: unable to monitor directories for changes
- How do I convert an array of strings into a comma-separated string?
- ActiveRecord how to ignore pending migrations
- Rails 3. How to add a helper that ActiveAdmin will use?
- Looking for suggestions for building a secure REST API within Ruby on Rails
- How do you find the namespace/module name programmatically in Ruby on Rails?
- Rails, How to render a view/partial in a model
- Rails 4 Unpermitted Parameters for Array
- Add nullable foreign key in Rails
- How do I force ActiveRecord to reload a class?
- Undefined instance method “respond_to” in Rails 5 API Controller
- Ruby on Rails: How do you explicitly define plural names and singular names in Rails?
- Can’t find libcurl or curl/curl.h (RuntimeError)
- Rails POST, PUT, GET
- How to convert array of ActiveRecord models to CSV?
- How to create a deep copy of an object in Ruby?
- How to filter parameters in rails?
- Ruby: How to group a Ruby array?
- Gem file with git remote failing on heroku push
- Why do I get an “undefined method for `has_attached_file` when installing PaperClip?
- What’s the difference between Ruby and JRuby? [closed]
- how to read a User uploaded file, without saving it to the database
- Rails: How do I write tests for a ruby module?
- Minitest and Rspec [closed]
- “rake assets:precompile” gives punc error
- Error while installing Nokogiri (1.6.7) on El Capitan
- Best way to highlight current page in Rails 3? — apply a css class to links conditionally
- Extending Devise SessionsController to authenticate using JSON