If you don't need the time and just the date, then Date seems to have a much wider range
than Time.

Peter Krantz wrote:
> Hi!
> 
> I am trying to parse dates that take place in the future. When event
> dates occur after 2038-01-01 i get an time out of range error. To
> reproduce in irb:
> 
> irb(main):078:0> t = "2038-12-01T15:00:00.000Z"
> => "2038-12-01T15:00:00.000Z"
> 
> irb(main):079:0> s = "2012-12-01T15:00:00.000Z"
> => "2012-12-01T15:00:00.000Z"
> 
> irb(main):080:0> Time::parse(s)
> => Sat Dec 01 15:00:00 UTC 2012
> 
> irb(main):081:0> Time::parse(t)
> ArgumentError: time out of range
>        from /opt/local/lib/ruby/1.8/time.rb:180:in `utc'
>        from /opt/local/lib/ruby/1.8/time.rb:180:in `make_time'
>        from /opt/local/lib/ruby/1.8/time.rb:243:in `parse'
>        from (irb):81
> 
> I am running ruby 1.8.4 (2005-12-24) [i686-darwin8.6.1].
> 
> Am I doing something wrong or is this a bug?
> 
> Kind regards,
> 
> Peter Krantz
> 
> 
>