freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT speakeasy.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: Date Problem
- Date: Wed, 05 Dec 2001 20:01:28 -0500
Brian Bruns wrote:
>
> >From src/tds/convert.c:
>
> /* FIX ME -- This fails for dates before 1902 or after 2038 */
>
> (jkl, faq entry for this thing?)
>
> The current implementation uses strftime() which accepts as an input the
> number of seconds since the epoch (Jan 1 1970) which being a signed 32bit
> integer gives the date range above. The fix will require an
> implementation of strftime (or something close) that handles the entire
> range of TDS datetime datatype. Of course if someone wants to point me at
> an implemenation under a usuable license that I can hork, we can have this
> fixed in a jiffy (datetime humor ;-)
Brian & Steven,
How many days are in a jiffy?
I am 50% done fixing the date problem (assuming I understand 100% of the
problem). I'm gonna skip the faq and fix the bug instead, with any
luck.
Compatibility with Sybase and Microsoft dictate we not handle dates
prior to the adoption of the Gregorian calendar (mid 18th century).
But, different countries adopted the calendar at different times; Russia
for one waited until the revolution. So, we should probably use the
LOCALE variable and a database along the lines of the timezone stuff to
gauge when to revert to the pre-Gregorian system. That would let us go
back to approximately 8,000 BC, approximately the dawn of
recordkeeping. Seems like rough justice to me.
Just kidding, of course. I am writing the code, but I'm not worried
about rendering unto Caesar's time.
--jkl
P.S. BTW, I did post an alternative implementation that doesn't wrap.
Was it no good?
-
Date Problem,
Steven J. Backus, 12/04/2001
- <Possible follow-up(s)>
- Re: Date Problem, Brian Bruns, 12/04/2001
- Re: Date Problem, James K. Lowden, 12/05/2001
- Re: Date Problem, James Cameron, 12/05/2001
- Re: Date Problem, James K. Lowden, 12/05/2001
- Re: Date Problem, Eric Deutsch, 12/07/2001
- Re: Date Problem, James K. Lowden, 12/09/2001
Archive powered by MHonArc 2.6.24.