I'm generating and storing time in milliseconds as follow :
(Time.now.to_f * 1000).t开发者_JS百科o_i # => 1297073972278
How can I parse nicely this number to get the time object back?
Time.at 1297073972278 / 1000
=> Mon Feb 07 11:19:32 +0100 2011
I'm generating and storing time in milliseconds as follow :
(Time.now.to_f * 1000).t开发者_JS百科o_i # => 1297073972278
How can I parse nicely this number to get the time object back?
Time.at 1297073972278 / 1000
=> Mon Feb 07 11:19:32 +0100 2011
精彩评论