Skip to Content.
Sympa Menu

freetds - [freetds] mseconds lost when using cs_dt_crack

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Fred Romelfanger <fred AT stsci.edu>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] mseconds lost when using cs_dt_crack
  • Date: Wed, 19 May 2004 09:28:21 -0400

We found when porting some of our code to freetds that the milliseconds get
lost
from the returned data when using cs_dt_crack to break up a timestamp into
a CS_DATEREC data structure. Here is a context diff for src/ctlib/cs.c as
compared to the file in the freetds repository.


diff -C 5 cs.c.cvs cs.c
*** cs.c.cvs Wed May 19 09:13:20 2004
--- cs.c Wed May 19 09:15:39 2004
***************
*** 692,701 ****
--- 692,702 ----
daterec->datedyear = dr.dayofyear;
daterec->datedweek = dr.weekday;
daterec->datehour = dr.hour;
daterec->dateminute = dr.minute;
daterec->datesecond = dr.second;
+ daterec->datemsecond = dr.millisecond;
daterec->datetzone = 0;

return CS_SUCCEED;
}




Archive powered by MHonArc 2.6.24.

Top of Page