Skip to Content.
Sympa Menu

freetds - Re: New build warnings; datetime format issue

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: New build warnings; datetime format issue
  • Date: Wed, 29 May 2002 07:10:17 -0400 (EDT)


Bill,

i think when we add back the locale stuff, we'll leave it to the API to
set a suitable default value, that way dblib can express the milliseconds,
and ctlib can do it the other way. Of course, modifying the locale.conf
file will override this for both. So, I wouldn't worry about this too
much at this point.

Brian

On Tue, 28 May 2002, Bill Thompson wrote:

> Hmmm. I kind of thought this would happen. My fault I'm afraid, but let me
> explain...
>
> FreeTDS conversion routines (dbconvert in db-lib for example) used to
> convert a date to the string format "Jan 1 1800 12:00AM".
>
> However, I discovered that the real dbconvert routine ( in Sybase's db-lib
> ) would output in the format "Jan 1 1800 12:00:00:000AM" , so I changed
> our version to do the same thing. This was kind of a byproduct of my BCP
> work. In a bcp character output file a date gets represented in the latter
> format, and I needed to reproduce this. This led me to completely overhaul
> the date/time conversion routines, which I now think are pretty good. We
> can handle dates from 1753 thru 9999 , and also do milliseconds.
>
> My guess is that sqsh or isql doesn't simply print the output of the
> dbconvert routine, but post-formats the output, or uses dbdatecrack to
> give a "user-friendly" output - sans the seconds and milliseconds.
>
> I did agonize about this - in the knowledge that what I coded may have
> adverse effects on FreeTDS users, but at the end of the day, I decided to
> faithfully replicate the behaviour of dbconvert in Sybase open client...
>
> I've kept an eye on numerous posts about date/time formats on the forum,
> and could see this issue was going to be a big one, I guess this one will
> run and run....
>
> Bill
>
>





Archive powered by MHonArc 2.6.24.

Top of Page