irb(main):068:0> @@config[“date”]
=> “27/12/2007”
irb(main):069:0> Time.parse(@@config[“date”])
ArgumentError: argument out of range
from e:/ruby/lib/ruby/1.8/time.rb:184:in local' from e:/ruby/lib/ruby/1.8/time.rb:184:inmake_time’
from e:/ruby/lib/ruby/1.8/time.rb:243:in `parse’
from (irb):69
from :0
irb(main):070:0>
You have the month and day swapped - there’s no 27th month in a year:
$ irb
irb(main):001:0> require ‘time’
=> true
irb(main):002:0> Time.parse(‘27/12/2007’)
ArgumentError: argument out of range
from /home/felix/ruby1.8.6/lib/ruby/1.8/time.rb:184:in local' from /home/felix/ruby1.8.6/lib/ruby/1.8/time.rb:184:inmake_time’
from /home/felix/ruby1.8.6/lib/ruby/1.8/time.rb:243:in `parse’
from (irb):2
irb(main):003:0> Time.parse(‘12/27/2007’)
=> Thu Dec 27 00:00:00 -0800 2007
irb(main):004:0>
from /home/felix/ruby1.8.6/lib/ruby/1.8/time.rb:184:in `local'
Felix
i have a canadian layout and my regional settings on my computer is
set to dd/mm/yyyy. strange that ruby cannot get this one right. all my
office apps and my oracle and mysql databases now recognise this
format on my computer.
ArgumentError: argument out of range
irb(main):001:0> require ‘time’
irb(main):004:0>
HTH,
Felix
i have a canadian layout and my regional settings on my computer is
set to dd/mm/yyyy. strange that ruby cannot get this one right. all my
office apps and my oracle and mysql databases now recognise this
format on my computer.