From: Michael Neumann Date: 2001-01-31T18:24:24+09:00 Subject: [ruby-talk:10163] Re: DateTime class for Ruby? On Wed, 31 Jan 2001, Andrew Hunt wrote: > On Wed, 31 Jan 2001 06:43:05 +0900, Michael Neumann > wrote: > > Hi, > > > > Is there a "DateTime" class in Ruby, which can handle dates before 1970 > > as well as storing the time? > > If I use Date from "date.rb" this will not store the time, and > > if I use Time this will raise an "time out of range" error when year is below 1970 (UNIX-date :(. > > > Most people don't seem to care about time when dealing with > dates a few hundred years old :-) > > Just out of curiosity, what is the application that > requires this? I've just completing XML-RPC for Ruby. But one of the official test-suite's tests gives a dateTime like "1904-01-04 05:04:12" which I convert to a Date object and had to return to the test-suite. The value returned is "1904-01-04 12:00:00". Of course it fails :) > > /\ndy -- Michael Neumann