Time.new inconsitencies
-----------------------
Key: JRUBY-2698
URL: http://jira.codehaus.org/browse/JRUBY-2698
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.1.2
Environment: JDK6 (1.6.0_06) and JDK5 (1.5.0_07) on Solaris 10 (32bit)
Reporter: Igor Minar
Assignee: Thomas E Enebo
Priority: Critical
One of our rails tests kept on failing intermittently. After some poking around
I noticed that it this is caused by {{Time.now}}. This test case describes the
problem the best:
{code}
while (true) do
t1=Time.now
t2=Time.now
if t1 > t2
puts "\n Time shift occurred! #{t1.to_i}.#{t1.usec} > #{t2.to_i}.#{t2.usec}"
break
else
print "."
end
end
{code}
{code}
$ jruby test.rb
....
1214278834.151719 > 1214278834.151182
{code}
I tried to run the same script on MacOSX (JDK5 and 6) and things work properly,
so I wonder if this isn't actually a problem in the Solaris version of JDK.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email