From: Brian Candler Date: 2010-08-11T16:49:58+09:00 Subject: Re: Error: Bignum too big to convert into `long' Matt Mencel wrote: > Ah... > > 9223372036854775807 is the timestamp value assigned to the > "accountExpires" attribute in Active Directory when any account is set > to "Never Expire". > > It works fine on Linux/Mac but not on Solaris. I guess I'll just > convert that timestamp to something like 12/31/2099 23:59:59 before I > run the Time.at. The largest Time you can have in a 32-bit value is: irb(main):001:0> Time.at(0x7fffffff) => Tue Jan 19 03:14:07 +0000 2038 irb(main):002:0> Time.at(0x7fffffff+1) RangeError: bignum too big to convert into `long' from (irb):2:in `at' from (irb):2 from :0 Being Ruby, you are not constrained to using a numeric value. You could use nil, or a symbol like :never, or a custom object which has sufficient Time-like behaviours: Never = Object.new def Never.to_s; "Never"; end -- Posted via http://www.ruby-forum.com/.