Eric Hodel wrote:
> On Apr 28, 2006, at 7:15 AM, 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?
> 
> Use a machine with a 64 bit time_t:
> 
> $ ruby -rtime -ve 'p Time.parse("3000-01-01")'
> ruby 1.8.4 (2005-12-24) [amd64-freebsd6]
> Wed Jan 01 00:00:00 PST 3000
> 

Yes, but, BUT, you are limited to the year 2,147,485,547 on Solaris due 
to INT_MAX.

I know, I know - no one ever thinks there app is going to be around that 
long.  But mark my words, some day Farg Fleeblebuuk of the 23rd 
Plasmatic Programming Core on a remote moon in the Mixilflix Galaxy 
(formerly Galaxy #13983) will be tasked with maintaining your Rails 
application when suddenly...BOOM!

And then, and THEN, you'll all be sorry!

Dan