Skip to Content.
Sympa Menu

freetds - Re: Sybase ASA Date Range ?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: Sybase ASA Date Range ?
  • Date: Mon, 29 Apr 2002 11:58:45 -0400


> From: Brian Bruns [mailto:camber AT ais.org]
> Sent: April 29, 2002 8:07 AM
> > On Mon, 29 Apr 2002, jekend wrote:
> > I encountered a puzzling problem . as follow :
> >
> > create table dtest(d date);
> > insert into dtest values('2099-12-31');
> >
> > In Interactive SQL :
> > select * from dtest ;
> > It displays '2099-12-31' , it is right;
> >
> > But In php ( via freetds )
> > It displays 'Nov 24 1963 05:31PM'
> >
> > I found that , PHP will make a mistake when the value is larger than
> > 2038-01-19 .
> > I wonder if it is a bug of freetds , or is due to the
> difference between
> > ASA and ASE .
> > Anyway, Freetds is to support ASE .
> > Is there any way to solve it ?
>
> I believe this is due to our use of strftime(). Somebody was
> cooking up a
> replacement for it, but I don't know where that stands? It's a
> semi-documented bug...usually pops up with dates prior to 1970 though.

Brian,

You asked Bill Thompson for his convert.c patches for datetime stuff on Thu
1/24/2002 7:27 AM. Did anything come of that?

I had been working on new datetime logic but put it down when Bill said he
had made extensive changes addressing the same problem. Since then, I
learned about Tai time (http://cr.yp.to/libtai.html), and I'd use that as a
building block. Dan Bernstein has placed the library in the public domain.

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page