From: Hugh Sasse Staff Elec Eng Date: 2001-08-08T22:35:08+09:00 Subject: [ruby-talk:19381] Date handling. For reading in dates we have parsedate. This will cope with timezones, and such. However, considering non-GMT zones, how does one convert them to Time objects? Time.local should do it, but that requires knowing isdst, and the isdst?() method won't work unless it is passed a correctly constructed Time value. So how do you pass the correct value in to local()? Just leave it as nil, perhaps? def my_parsedate(date, guessyear=false) year, mon, mday, hour, min, sec, zone, wday = ParseDate.parsedate(date,guessyear) return Date.new(year, mon, mday), Time.local(sec, min, hour, mday, mon, year, wday, nil, nil, zone) end Also, ParseDate, if passed a recent date field from ls, complains about: Jul 27 14:56 /usr/local/lib/ruby/1.6/date.rb:36:in `civil_to_jd': undefined method `/' for ni l (NameError) from /usr/local/lib/ruby/1.6/date.rb:137:in `exist3?' from /usr/local/lib/ruby/1.6/date.rb:146:in `new3' from ./datestuff.rb:9:in `my_parsedate' This is probably because the year is not defined. Could this be changed so that the year centred about Time.now() is used? This would cover ls which uses these for the last 6 months (on Solaris 2.7, anyway). Hugh