开发者

How to parse time saved in milli/micro seconds as integer in ruby?

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜