bauagonzo created JRUBY-6287: -------------------------------- Summary: DateTime.to_time method is missing Key: JRUBY-6287 URL: https://jira.codehaus.org/browse/JRUBY-6287 Project: JRuby Issue Type: Bug Components: Standard Library Affects Versions: JRuby 1.6.5 Environment: windows/linux Reporter: bauagonzo Assignee: Thomas E Enebo Priority: Critical
Hello, I need to convert DateTime to Time. In CRuby there is the method to_time but it seems to be missing from JRuby. for example in CRuby : irb(main):008:0> DateTime.now.to_time => 2011-12-19 16:56:01 -0500 and in JRuby : irb(main):011:0> DateTime.now.to_time NoMethodError: undefined method `to_time' for #<DateTime: 212191091751911/864000 00,-5/24,2299161> from (irb):11:in `evaluate' from org/jruby/RubyKernel.java:1088:in `eval' from c:/jruby-1.6.5/lib/ruby/1.8/irb.rb:158:in `eval_input' from c:/jruby-1.6.5/lib/ruby/1.8/irb.rb:271:in `signal_status' from c:/jruby-1.6.5/lib/ruby/1.8/irb.rb:155:in `eval_input' from org/jruby/RubyKernel.java:1420:in `loop' from org/jruby/RubyKernel.java:1192:in `catch' from c:/jruby-1.6.5/lib/ruby/1.8/irb.rb:154:in `eval_input' from c:/jruby-1.6.5/lib/ruby/1.8/irb.rb:71:in `start' from org/jruby/RubyKernel.java:1192:in `catch' from c:/jruby-1.6.5/lib/ruby/1.8/irb.rb:70:in `start' from c:\jruby-1.6.5\bin\jirb:13:in `(root)' I have this problem even if I run JRuby in 1.9 compat mode. Is there any workaround for this ? Rgds -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.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