RubyTime class is implicitly convertible to DateTime. So you shouldn't need to 
convert it explicitly in most cases.
You can call DateTime method to get DateTime from RubyTime if needed:

>>> Time.now
=> Mon Jan 11 20:40:12 -0800 2010
>>> Time.now.DateTime
=> 1/11/2010 8:40:15 PM

Tomas

From: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Orion Edwards
Sent: Monday, January 11, 2010 7:27 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Review: Time does not map to System.DateTime

I've just upgraded to the latest IronRuby and am hitting this... Given that I 
have a bunch of Time objects, how do I now convert them to a System::DateTime 
for clr interop? I can't seem to find any methods on the ruby Time object that 
return the clr object
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to