How to convert a Java Date object to a jruby time object?
•
Java
Using J ruby, is there a good way to convert Java date objects to jruby time objects? I'm using the latest version of jruby (1.3.1) and Java se 6
Solution
This should work properly:
Time.at(java.util.Date.new.getTime/1000)
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码