Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

unix timestamp to date time rails

2.1.0 :002 > Time.at(1432927800000/1000).to_s(:db)
 => "2015-05-29 22:30:00"
# Instead of strftime will be better to use predefined :db pattern from ActiveSupport:

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unix #timestamp #date #time #rails
ADD COMMENT
Topic
Name
1+6 =