Skip to Content.
Sympa Menu

freetds - Re: Error in dates > 2040 (and Fix)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Kline <bkline AT rksystems.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Error in dates > 2040 (and Fix)
  • Date: Fri, 10 Nov 2000 07:12:44 -0500 (EST)


On Thu, 9 Nov 2000, Mark O'Donohue wrote:

>
> The calculation intermediate in this line
>
> long seconds = (long)((days - 25567)*(24*60*60))
> + (long)(time/300);
>
> defaults to int arithmatic rather than long before the cast. So
> dates > 2040 are wrong.
>
> The patch below defines days as a long so that the calculation then
> defaults to long arithmateic and it doesn't overflow.

What happened to the patch I sent in on 14 August this past summer which
fixed this problem and at least one other failure? We should probably
apply that patch to make sure all the affected areas get fixed, or at
least look at it. Was there a problem with that patch, Craig?

--
Bob Kline
mailto:bkline AT rksystems.com
http://www.rksystems.com





Archive powered by MHonArc 2.6.24.

Top of Page