class Time
# Convert a time that is 'milliseconds since epoch' to a Time object
#
# @return [Time] A time object created from a 'milliseconds since epoch' timestamp
def self.from_millisecond_epoch time
Time.at(time / 1000)
end
end
in ruby 1.9.3-p429 this passes:
Time.from_millisecond_epoch(1366658285432).should eql Time.new(2013,4,22,14,18,05,'-05:00')
in jruby 1.7.4 it doesn't, I get:
expected: 2013-04-22 14:18:05 +0500
got: 2013-04-22 14:18:05 -0500