Shri Borde
2009-Nov-19 21:23 UTC
[Ironruby-core] Review: Time does not map to System.DateTime
tfpt review /shelveset:time;sborde Makes Time mutable. It was mapped to System.DateTime which is immutable. However, Time#utc mutates the instance. So now we define a new type Time with a _dateTime field. The core\shared\gmtime test is not enabled because it expects that modifying ENV[''TZ''] at runtime changes the timezone, which is not supported yet in IronRuby (and MRI too) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091119/f74d4e62/attachment.html>
Orion Edwards
2010-Jan-12 03:27 UTC
[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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100112/ad111dde/attachment.html>
Tomas Matousek
2010-Jan-12 04:43 UTC
[Ironruby-core] Review: Time does not map to System.DateTime
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-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Monday, January 11, 2010 7:27 PM To: ironruby-core at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100112/c85c4b26/attachment-0001.html>