From: _Kevin Date: 2006-10-27T11:55:06+09:00 Subject: Re: Time without Date List Recv wrote: > Related question: > > Is there a way to convert a Time (or DateTime) to Ruby's Date class? I added a few conversion methods like this to 'ruby-units' gem class Time def to_datetime DateTime.civil(1970,1,1)+(self.to_f+self.gmt_offset)/86400 end def to_date Date.civil(1970,1,1)+(self.to_f+self.gmt_offset)/86400 end end This seems to work pretty well, although I haven't tested it on a wide range of OSs. _Kevin