WebServices and DateTime - 3 elements of civil date are nece

I simply trying to receive an array of objects, retrieved by
ActiveRecord from table with datetime column and I have:

test_list(SoapControllerApiTest):
ArgumentError: 3 elements of civil date are necessary
/usr/lib/ruby/1.8/date.rb:1214:in new_with_hash' /usr/lib/ruby/1.8/date.rb:1258:inparse’

It’s a bug or I am wrong somewhere?

Are you using Windows? I ran into the same problem. There is a problem
with Ruby and the Windows DateTime format. I still haven’t found a
solution to this. Supposedly ruby 1.9 fixes this, but after replacing
the 1.8 date files with the 1.9 ones it still doesn’t work for me.

zven wrote:

I simply trying to receive an array of objects, retrieved by
ActiveRecord from table with datetime column and I have:

test_list(SoapControllerApiTest):
ArgumentError: 3 elements of civil date are necessary
/usr/lib/ruby/1.8/date.rb:1214:in new_with_hash' /usr/lib/ruby/1.8/date.rb:1258:inparse’

It’s a bug or I am wrong somewhere?

On Thu, 2006-05-18 at 22:24 +0200, Chris G. wrote:

Are you using Windows? I ran into the same problem. There is a problem
with Ruby and the Windows DateTime format. I still haven’t found a
solution to this. Supposedly ruby 1.9 fixes this, but after replacing
the 1.8 date files with the 1.9 ones it still doesn’t work for me.

Nope, I am using Debian.

Hi, what’s the relevant code that generates the below error?
If you can post the relevant method, it would help the group
better help you.

Thanks,

-Conrad

Using Ruby 1.8.4, Windows, and MySQL I ran into the same problem using
the example in “Agile Web D. with Rails”. (The same code worked
fine on my coworker’s Mac.)

If you want a really, really lame workaround so that you can continue in
your development, you can add this to the
self.parse(str=’-4712-01-01T00:00:00Z’, comp=false, sg=ITALY) function
in date.rb:

str.gsub!(" Eastern", "E")
str.gsub!(" Standard", "S")
str.gsub!(" Daylight", "D")
str.gsub!(" Time", "T")

… before the “elem = _parse(str, comp)”. (Make sure you add your time
zone in there, too.)